結果

問題 No.3085 Math...?
ユーザー simansiman
提出日時 2023-01-09 19:55:47
言語 Ruby
(3.3.0)
結果
AC  
実行時間 90 ms / 2,345 ms
コード長 163 bytes
コンパイル時間 563 ms
コンパイル使用メモリ 11,264 KB
実行使用メモリ 15,560 KB
最終ジャッジ日時 2023-08-22 20:37:21
合計ジャッジ時間 4,860 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,344 KB
testcase_01 AC 90 ms
15,468 KB
testcase_02 AC 86 ms
15,452 KB
testcase_03 AC 85 ms
15,380 KB
testcase_04 AC 86 ms
15,492 KB
testcase_05 AC 87 ms
15,560 KB
testcase_06 AC 88 ms
15,452 KB
testcase_07 AC 88 ms
15,344 KB
testcase_08 AC 86 ms
15,360 KB
testcase_09 AC 90 ms
15,560 KB
testcase_10 AC 88 ms
15,336 KB
testcase_11 AC 86 ms
15,384 KB
testcase_12 AC 88 ms
15,508 KB
testcase_13 AC 86 ms
15,452 KB
testcase_14 AC 86 ms
15,332 KB
testcase_15 AC 89 ms
15,456 KB
testcase_16 AC 87 ms
15,508 KB
testcase_17 AC 88 ms
15,460 KB
testcase_18 AC 87 ms
15,412 KB
testcase_19 AC 87 ms
15,424 KB
testcase_20 AC 85 ms
15,340 KB
testcase_21 AC 87 ms
15,516 KB
testcase_22 AC 86 ms
15,340 KB
testcase_23 AC 84 ms
15,404 KB
testcase_24 AC 85 ms
15,452 KB
testcase_25 AC 86 ms
15,508 KB
testcase_26 AC 84 ms
15,508 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:12: warning: assigned but unused variable - a
Syntax OK

ソースコード

diff #

Q = gets.to_i

sum = 0
memo = []
1.upto(22141) do |i|
  sum += i
  sum %= 17
  memo << sum
end

Q.times do
  a, b = gets.split.map(&:to_i)

  puts memo[b - 1]
end
0