結果
| 問題 | No.531 エヌスクミ島の平和協定 |
| コンテスト | |
| ユーザー |
wonda_t_coffee
|
| 提出日時 | 2020-02-04 22:53:19 |
| 言語 | Ruby (4.0.6 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 52 ms / 2,000 ms |
| + 661µs | |
| コード長 | 127 bytes |
| 記録 | |
| コンパイル時間 | 9 ms |
| コンパイル使用メモリ | 9,680 KB |
| 実行使用メモリ | 14,464 KB |
| 最終ジャッジ日時 | 2026-09-01 12:40:24 |
| 合計ジャッジ時間 | 3,886 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 |
コンパイルメッセージ
Main.rb:6: 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.chomp.split.map(&:to_i) if n <= m puts 1 elsif n % 2 == 1 puts -1 elsif n / 2 <= m puts 2 else puts -1 end
wonda_t_coffee