結果

問題 No.682 Average
ユーザー finefine
提出日時 2018-05-11 22:20:54
言語 Ruby
(3.3.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 117 bytes
コンパイル時間 249 ms
コンパイル使用メモリ 11,388 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-09-10 12:44:53
合計ジャッジ時間 1,942 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,068 KB
testcase_01 AC 83 ms
15,092 KB
testcase_02 AC 79 ms
15,044 KB
testcase_03 AC 79 ms
15,352 KB
testcase_04 AC 82 ms
15,076 KB
testcase_05 AC 79 ms
15,052 KB
testcase_06 AC 78 ms
15,100 KB
testcase_07 AC 79 ms
15,144 KB
testcase_08 AC 79 ms
15,136 KB
testcase_09 AC 79 ms
15,304 KB
testcase_10 AC 81 ms
15,332 KB
testcase_11 AC 81 ms
15,080 KB
testcase_12 AC 80 ms
15,260 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a, b = gets.split.map(&:to_i)
ans = 0
a.upto(b) do |i|
    if (a + b + i) % 3 == 0
        ans += 1
    end
end
p ans
0