結果

問題 No.988 N×Mマス計算(総和)
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-02-14 21:26:34
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 223 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 11,328 KB
実行使用メモリ 26,000 KB
最終ジャッジ日時 2023-09-20 11:28:17
合計ジャッジ時間 5,663 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
19,740 KB
testcase_01 AC 80 ms
15,128 KB
testcase_02 AC 113 ms
16,448 KB
testcase_03 AC 96 ms
16,376 KB
testcase_04 AC 83 ms
15,184 KB
testcase_05 AC 125 ms
16,672 KB
testcase_06 AC 121 ms
16,656 KB
testcase_07 AC 127 ms
16,584 KB
testcase_08 AC 96 ms
16,472 KB
testcase_09 AC 87 ms
15,856 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

n, m, k = gets.chomp.split.map(&:to_i)

b = gets.chomp.split
op = b.shift

a = [] * n
n.times do
  a << gets.chomp
end

sum = 0
a.each do |ai|
  b.each do |bi|
    sum += eval(ai + op + bi)
  end
  sum %= k
end
puts sum % k
0