結果
| 問題 |
No.987 N×Mマス計算(基本)
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2022-12-28 09:52:29 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 96 ms / 2,000 ms |
| コード長 | 162 bytes |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,544 KB |
| 最終ジャッジ日時 | 2024-11-23 01:18:57 |
| 合計ジャッジ時間 | 3,253 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - w Syntax OK
ソースコード
h,w=gets.split(" ").map{|e| e.to_i}
s=gets.chomp.split(" ")
o=s.shift
s=s.map{|e| e.to_i}
h.times{
t=gets.to_i
puts s.map{|e| (o=="+")?(e+t):(e*t)}.join(" ")
}
horiesiniti