結果

問題 No.396 クラス替え
ユーザー 💕💖💞💕💖💞
提出日時 2016-09-16 00:17:34
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 226 bytes
コンパイル時間 37 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-04-28 13:58:15
合計ジャッジ時間 2,323 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
12,160 KB
testcase_01 WA -
testcase_02 AC 80 ms
12,160 KB
testcase_03 AC 80 ms
12,160 KB
testcase_04 AC 78 ms
12,160 KB
testcase_05 AC 81 ms
12,160 KB
testcase_06 AC 79 ms
12,032 KB
testcase_07 AC 81 ms
12,160 KB
testcase_08 WA -
testcase_09 AC 75 ms
12,288 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 77 ms
12,032 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 76 ms
12,032 KB
testcase_17 WA -
testcase_18 AC 77 ms
12,160 KB
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

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()
0