結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー maimai
提出日時 2016-11-18 22:32:57
言語 Ruby
(3.3.0)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 11,528 KB
実行使用メモリ 15,364 KB
最終ジャッジ日時 2023-08-17 11:02:23
合計ジャッジ時間 2,789 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,024 KB
testcase_01 AC 76 ms
15,024 KB
testcase_02 AC 77 ms
15,068 KB
testcase_03 AC 76 ms
15,216 KB
testcase_04 AC 78 ms
15,188 KB
testcase_05 AC 77 ms
15,160 KB
testcase_06 AC 77 ms
15,120 KB
testcase_07 AC 76 ms
15,364 KB
testcase_08 AC 76 ms
15,104 KB
testcase_09 AC 77 ms
15,056 KB
testcase_10 AC 77 ms
15,124 KB
testcase_11 AC 76 ms
15,080 KB
testcase_12 AC 76 ms
15,272 KB
testcase_13 AC 76 ms
15,192 KB
testcase_14 AC 76 ms
15,212 KB
testcase_15 AC 75 ms
15,280 KB
testcase_16 AC 77 ms
15,248 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a,b = gets.chomp,gets.chomp

if a=~/^(?:0|(?:[1-9][0-9]*))$/ && b=~/^(?:0|(?:[1-9][0-9]*))$/
    a = a.to_i
    b = b.to_i
    if 0 <= a && a <= 12345 && 0 <= b && b <= 12345
        puts "OK"
    else
        puts "NG"
    end
else
    puts "NG"
end
0