結果

問題 No.987 N×Mマス計算(基本)
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-02-14 21:23:38
言語 Ruby
(3.2.2)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 184 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 11,224 KB
実行使用メモリ 16,844 KB
最終ジャッジ日時 2023-07-28 17:19:04
合計ジャッジ時間 4,061 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,200 KB
testcase_01 AC 81 ms
15,108 KB
testcase_02 AC 115 ms
15,908 KB
testcase_03 AC 91 ms
15,868 KB
testcase_04 AC 106 ms
16,016 KB
testcase_05 AC 104 ms
16,152 KB
testcase_06 AC 115 ms
15,892 KB
testcase_07 AC 97 ms
16,092 KB
testcase_08 AC 83 ms
15,496 KB
testcase_09 AC 86 ms
15,352 KB
testcase_10 AC 85 ms
15,432 KB
testcase_11 AC 115 ms
16,516 KB
testcase_12 AC 124 ms
16,756 KB
testcase_13 AC 96 ms
16,608 KB
testcase_14 AC 82 ms
15,352 KB
testcase_15 AC 97 ms
16,304 KB
testcase_16 AC 127 ms
16,372 KB
testcase_17 AC 118 ms
16,844 KB
testcase_18 AC 126 ms
16,572 KB
testcase_19 AC 152 ms
16,604 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

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

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

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

a.each do |ai|
  puts b.map{|bi| eval(ai + op + bi)}.join(' ')
end
0