結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,428 KB
testcase_01 AC 81 ms
15,156 KB
testcase_02 AC 114 ms
16,392 KB
testcase_03 AC 97 ms
16,416 KB
testcase_04 AC 82 ms
15,176 KB
testcase_05 AC 121 ms
16,520 KB
testcase_06 AC 125 ms
16,404 KB
testcase_07 AC 126 ms
16,564 KB
testcase_08 AC 95 ms
16,472 KB
testcase_09 AC 88 ms
15,624 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:4: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

# gets.chomp.to_i
# gets.chomp.split.map(&:to_i)

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
end
puts sum % k
0