結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー 小指が強い人小指が強い人
提出日時 2016-11-19 01:26:18
言語 Ruby
(3.3.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 11,540 KB
実行使用メモリ 15,280 KB
最終ジャッジ日時 2023-08-17 13:53:55
合計ジャッジ時間 2,580 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,148 KB
testcase_01 AC 80 ms
15,244 KB
testcase_02 AC 79 ms
15,140 KB
testcase_03 AC 78 ms
15,068 KB
testcase_04 AC 79 ms
15,256 KB
testcase_05 AC 78 ms
15,280 KB
testcase_06 AC 78 ms
15,172 KB
testcase_07 AC 79 ms
15,232 KB
testcase_08 AC 79 ms
15,168 KB
testcase_09 AC 78 ms
15,144 KB
testcase_10 AC 79 ms
15,216 KB
testcase_11 AC 78 ms
15,232 KB
testcase_12 AC 76 ms
15,168 KB
testcase_13 AC 79 ms
15,068 KB
testcase_14 AC 78 ms
15,064 KB
testcase_15 AC 78 ms
15,068 KB
testcase_16 AC 79 ms
15,172 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a=gets.strip
b=gets.strip
r=/^[^0a-zA-Z][0-9]*$|^0$/
if r.match(a) && r.match(b)
    if a.to_i >= 0 && a.to_i <= 12345 && b.to_i >= 0 && b.to_i <= 12345
        puts "OK"
    else
        puts "NG"
    end
else
    puts "NG"
end
0