結果

問題 No.201 yukicoderじゃんけん
ユーザー nonokai10nonokai10
提出日時 2018-03-25 11:51:40
言語 Ruby
(3.3.0)
結果
AC  
実行時間 88 ms / 5,000 ms
コード長 290 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 11,220 KB
実行使用メモリ 15,464 KB
最終ジャッジ日時 2023-09-07 11:32:57
合計ジャッジ時間 2,815 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,208 KB
testcase_01 AC 80 ms
15,104 KB
testcase_02 AC 78 ms
15,124 KB
testcase_03 AC 79 ms
15,160 KB
testcase_04 AC 79 ms
15,084 KB
testcase_05 AC 82 ms
15,344 KB
testcase_06 AC 79 ms
15,268 KB
testcase_07 AC 79 ms
15,008 KB
testcase_08 AC 80 ms
15,292 KB
testcase_09 AC 83 ms
15,016 KB
testcase_10 AC 79 ms
15,064 KB
testcase_11 AC 86 ms
15,036 KB
testcase_12 AC 83 ms
15,252 KB
testcase_13 AC 83 ms
15,060 KB
testcase_14 AC 81 ms
15,012 KB
testcase_15 AC 79 ms
15,120 KB
testcase_16 AC 79 ms
15,088 KB
testcase_17 AC 79 ms
15,088 KB
testcase_18 AC 88 ms
15,248 KB
testcase_19 AC 85 ms
15,464 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:17: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Main.rb:1: warning: assigned but unused variable - c
Main.rb:2: warning: assigned but unused variable - f
Syntax OK

ソースコード

diff #

a, b, c = gets.split
d, e, f = gets.split
case b.size <=> e.size
when -1
  puts d
when 0
  (0...b.size).each do |i|
    case b[i] <=> e[i]
    when -1
      puts d
      break
    when 1
      puts a
      break
    end
    if i == b.size - 1
      puts -1
    end
  end
when 1
  puts a
end
0