結果

問題 No.643 Two Operations No.2
ユーザー simansiman
提出日時 2021-01-14 20:07:23
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 113 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 11,504 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-08-16 03:34:36
合計ジャッジ時間 3,050 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
15,104 KB
testcase_01 AC 82 ms
15,284 KB
testcase_02 AC 87 ms
15,240 KB
testcase_03 AC 82 ms
15,232 KB
testcase_04 AC 85 ms
15,184 KB
testcase_05 AC 82 ms
15,264 KB
testcase_06 WA -
testcase_07 AC 82 ms
15,108 KB
testcase_08 WA -
testcase_09 AC 83 ms
15,036 KB
testcase_10 AC 82 ms
15,352 KB
testcase_11 AC 85 ms
15,244 KB
testcase_12 AC 83 ms
15,036 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:10: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

X, Y = gets.split.map(&:to_i)

if X == Y
  puts 0
elsif X == 0
  puts 2
elsif Y == 0
  puts 1
else
  puts -1
end
0