結果
問題 |
No.396 クラス替え
|
ユーザー |
![]() |
提出日時 | 2016-09-16 00:17:34 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 226 bytes |
コンパイル時間 | 61 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-17 06:20:01 |
合計ジャッジ時間 | 2,355 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 9 |
コンパイルメッセージ
Main.rb:6: warning: `-' after local variable or literal is interpreted as binary operator Main.rb:6: warning: even though it seems like unary operator Main.rb:2: warning: assigned but unused variable - n Syntax OK
ソースコード
def run m, n = gets.strip.split(" ").map { |x| x.to_i } xx, yy = gets.strip.split(" ").map { |x| x.to_i } m *= 2 if (xx - yy)%m == 0 or (xx + yy -2)%m = m - 1 then puts "YES" else puts "NO" end end run()