結果

問題 No.987 N×Mマス計算(基本)
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-02-14 21:23:38
言語 Ruby
(3.3.0)
結果
AC  
実行時間 165 ms / 2,000 ms
コード長 184 bytes
コンパイル時間 66 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 13,568 KB
最終ジャッジ日時 2024-04-16 01:26:03
合計ジャッジ時間 3,291 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
12,160 KB
testcase_01 AC 100 ms
12,160 KB
testcase_02 AC 131 ms
13,312 KB
testcase_03 AC 104 ms
12,928 KB
testcase_04 AC 124 ms
13,184 KB
testcase_05 AC 116 ms
12,928 KB
testcase_06 AC 130 ms
13,184 KB
testcase_07 AC 114 ms
12,800 KB
testcase_08 AC 96 ms
12,032 KB
testcase_09 AC 97 ms
12,288 KB
testcase_10 AC 98 ms
12,160 KB
testcase_11 AC 132 ms
13,312 KB
testcase_12 AC 143 ms
13,440 KB
testcase_13 AC 114 ms
13,184 KB
testcase_14 AC 93 ms
12,160 KB
testcase_15 AC 110 ms
12,928 KB
testcase_16 AC 144 ms
13,312 KB
testcase_17 AC 127 ms
13,568 KB
testcase_18 AC 138 ms
12,928 KB
testcase_19 AC 165 ms
13,056 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