結果
| 問題 |
No.1047 Zero (Novice)
|
| コンテスト | |
| ユーザー |
siman
|
| 提出日時 | 2020-06-28 20:37:18 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 84 ms / 2,000 ms |
| コード長 | 115 bytes |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-07-08 03:24:05 |
| 合計ジャッジ時間 | 2,448 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
コンパイルメッセージ
Main.rb:10: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
A, B = gets.split.map(&:to_i)
if A * B + B == 0
if B == 0
puts 1
else
puts 2
end
else
puts -1
end
siman