結果

問題 No.799 赤黒かーどげぇむ
ユーザー finefine
提出日時 2019-03-17 21:22:18
言語 Ruby
(3.1.1p18 )
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 189 ms
使用メモリ 14,004 KB
最終ジャッジ日時 2023-02-11 03:21:25
合計ジャッジ時間 3,017 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 72 ms
13,956 KB
testcase_01 AC 71 ms
13,824 KB
testcase_02 AC 70 ms
14,004 KB
testcase_03 AC 70 ms
13,848 KB
testcase_04 AC 70 ms
13,724 KB
testcase_05 AC 71 ms
13,828 KB
testcase_06 AC 70 ms
13,936 KB
testcase_07 AC 71 ms
13,836 KB
testcase_08 AC 70 ms
13,836 KB
testcase_09 AC 71 ms
13,800 KB
testcase_10 AC 70 ms
13,904 KB
testcase_11 AC 71 ms
13,844 KB
testcase_12 AC 71 ms
13,836 KB
testcase_13 AC 71 ms
13,972 KB
testcase_14 AC 70 ms
13,724 KB
testcase_15 AC 70 ms
13,864 KB
testcase_16 AC 70 ms
13,800 KB
testcase_17 AC 71 ms
13,720 KB
testcase_18 AC 70 ms
13,728 KB
testcase_19 AC 71 ms
13,804 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a, b, c, d = gets.split.map(&:to_i)
cnt = 0
1.upto(100) do |i|
    if i >= a && i <= b && i >= c && i <= d
        cnt += 1
    end
end
p (b - a + 1) * (d - c + 1) - cnt
0