結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー basie23basie23
提出日時 2016-11-24 18:53:29
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 265 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 11,560 KB
実行使用メモリ 15,348 KB
最終ジャッジ日時 2023-08-18 07:02:19
合計ジャッジ時間 2,578 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 81 ms
15,148 KB
testcase_02 AC 81 ms
15,224 KB
testcase_03 AC 81 ms
15,292 KB
testcase_04 WA -
testcase_05 AC 81 ms
15,040 KB
testcase_06 AC 81 ms
15,160 KB
testcase_07 WA -
testcase_08 AC 83 ms
15,100 KB
testcase_09 WA -
testcase_10 AC 83 ms
15,128 KB
testcase_11 AC 81 ms
15,228 KB
testcase_12 AC 81 ms
15,072 KB
testcase_13 AC 81 ms
15,300 KB
testcase_14 AC 82 ms
15,136 KB
testcase_15 AC 80 ms
15,036 KB
testcase_16 AC 82 ms
15,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = gets.chomp
b = gets.chomp

if a =~ /^[A-Za-z]+$/
  puts'NG'
elsif b =~ /^[A-Za-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