結果
| 問題 | No.396 クラス替え |
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2016-09-16 00:17:34 |
| 言語 | Ruby (4.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 226 bytes |
| 記録 | |
| コンパイル時間 | 152 ms |
| コンパイル使用メモリ | 9,088 KB |
| 実行使用メモリ | 14,848 KB |
| 最終ジャッジ日時 | 2026-05-12 06:43:04 |
| 合計ジャッジ時間 | 2,250 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / tmp-judge_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 9 |
コンパイルメッセージ
Main.rb:6: warning: '-' after local variable or literal is interpreted as binary operator 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()
💕💖💞