結果
| 問題 | 
                            No.531 エヌスクミ島の平和協定
                             | 
                    
| コンテスト | |
| ユーザー | 
                             wonda_t_coffee
                         | 
                    
| 提出日時 | 2020-02-04 22:54:00 | 
| 言語 | Ruby  (3.4.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 95 ms / 2,000 ms | 
| コード長 | 113 bytes | 
| コンパイル時間 | 39 ms | 
| コンパイル使用メモリ | 7,424 KB | 
| 実行使用メモリ | 12,288 KB | 
| 最終ジャッジ日時 | 2024-09-21 07:47:57 | 
| 合計ジャッジ時間 | 4,679 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 37 | 
コンパイルメッセージ
Main.rb:6: 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 || n / 2 > m puts -1 else puts 2 end
            
wonda_t_coffee