結果

問題 No.682 Average
ユーザー object1234object1234
提出日時 2019-01-20 14:05:47
言語 Ruby
(3.3.0)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 537 ms
コンパイル使用メモリ 11,304 KB
実行使用メモリ 15,448 KB
最終ジャッジ日時 2023-10-11 09:20:54
合計ジャッジ時間 2,484 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
15,392 KB
testcase_01 AC 74 ms
15,292 KB
testcase_02 AC 75 ms
15,132 KB
testcase_03 AC 75 ms
15,204 KB
testcase_04 AC 75 ms
15,332 KB
testcase_05 AC 75 ms
15,192 KB
testcase_06 AC 77 ms
15,200 KB
testcase_07 AC 77 ms
15,448 KB
testcase_08 AC 78 ms
15,320 KB
testcase_09 AC 75 ms
15,184 KB
testcase_10 AC 74 ms
15,140 KB
testcase_11 AC 75 ms
15,184 KB
testcase_12 AC 75 ms
15,296 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = gets.chomp.split(" ").map { |i| i.to_i }
count = 0
(a[0]..a[1]).each do |i|
    avg = (a[0] + i + a[1]).to_f / 3
    count += 1 if avg * 10 % 10 == 0
end
puts count
0