結果
| 問題 |
No.531 エヌスクミ島の平和協定
|
| コンテスト | |
| ユーザー |
nonokai10
|
| 提出日時 | 2018-03-12 13:50:09 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 86 ms / 2,000 ms |
| コード長 | 171 bytes |
| コンパイル時間 | 212 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-09-19 18:35:24 |
| 合計ジャッジ時間 | 5,154 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 |
コンパイルメッセージ
Main.rb:4: warning: ambiguous first argument; put parentheses or a space even after `-' operator Main.rb:10: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
n, m = gets.split.map(&:to_i)
if n.odd?
if n > m
p -1
else
p 1
end
else
if n / 2 > m
p -1
elsif n / 2 <= m && n > m
p 2
else
p 1
end
end
nonokai10