結果

問題 No.988 N×Mマス計算(総和)
ユーザー shi-moshi-mo
提出日時 2020-09-29 23:42:05
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 220 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 11,196 KB
実行使用メモリ 21,940 KB
最終ジャッジ日時 2023-09-18 01:37:53
合計ジャッジ時間 6,787 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,192 KB
testcase_01 AC 81 ms
15,088 KB
testcase_02 AC 84 ms
15,088 KB
testcase_03 AC 85 ms
15,108 KB
testcase_04 AC 84 ms
15,092 KB
testcase_05 AC 84 ms
15,112 KB
testcase_06 AC 85 ms
15,248 KB
testcase_07 AC 84 ms
14,976 KB
testcase_08 AC 85 ms
15,284 KB
testcase_09 AC 81 ms
15,268 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n, m, k = gets.split.map(&:to_i)
op, *b = gets.chomp.split
b.map!(&:to_i)
a = []
n.times{ a << gets.to_i }

sum = 0
n.times do |i|
  m.times do |j|
    sum += [a[i], b[j]].inject(:"#{op}")
    sum %= k
  end
end
puts sum
0