結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー basie23basie23
提出日時 2016-11-24 18:49:44
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 66 ms
コンパイル使用メモリ 11,316 KB
実行使用メモリ 15,324 KB
最終ジャッジ日時 2023-08-18 07:01:58
合計ジャッジ時間 2,375 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 80 ms
15,148 KB
testcase_02 AC 79 ms
15,140 KB
testcase_03 AC 77 ms
15,248 KB
testcase_04 WA -
testcase_05 AC 77 ms
15,132 KB
testcase_06 AC 78 ms
15,232 KB
testcase_07 WA -
testcase_08 AC 78 ms
15,076 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 79 ms
15,272 KB
testcase_13 AC 78 ms
15,176 KB
testcase_14 AC 79 ms
15,324 KB
testcase_15 AC 78 ms
15,028 KB
testcase_16 AC 78 ms
15,132 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = gets.chomp
b = gets.chomp

if a =~ /^[A-Z]+$/
  puts'NG'
elsif b =~ /^[A-Z]+$/
  puts'NG'
else
  a = a.to_i
  b = b.to_i

  if 0 <= a && a <= 12345
    if 0 <= b && b <= 12345
      puts 'OK'
    else
      puts 'NG'
    end
  else
    puts 'NG'
  end
end
0