結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー ryoo14ryoo14
提出日時 2016-11-27 20:51:01
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-05-05 14:19:47
合計ジャッジ時間 2,052 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
12,160 KB
testcase_01 AC 89 ms
12,288 KB
testcase_02 AC 78 ms
12,032 KB
testcase_03 WA -
testcase_04 AC 80 ms
12,288 KB
testcase_05 AC 76 ms
12,160 KB
testcase_06 WA -
testcase_07 AC 75 ms
12,288 KB
testcase_08 WA -
testcase_09 AC 78 ms
12,288 KB
testcase_10 AC 77 ms
12,416 KB
testcase_11 AC 79 ms
12,288 KB
testcase_12 WA -
testcase_13 AC 75 ms
12,160 KB
testcase_14 AC 82 ms
12,160 KB
testcase_15 AC 80 ms
12,160 KB
testcase_16 AC 82 ms
12,416 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:4: warning: character class has duplicated range: /[a-zA-z]/
Syntax OK

ソースコード

diff #

a = gets
b = gets

if a =~ /[a-zA-z]/ || b =~ /[a-zA-Z]/ then
  puts "NG"
elsif a =~ /^0[0-9]*/ || b =~ /^0[0-9]*/ then
  puts "NG"
else
  a = a.to_i
  b = a.to_i
  if a > 12345 || b > 12345 then
    puts "NG"
  else
    puts "OK"
  end
end
0