結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー xkumiyuxkumiyu
提出日時 2018-06-15 18:06:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 9,220 KB
最終ジャッジ日時 2023-09-13 04:39:41
合計ジャッジ時間 1,462 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
9,092 KB
testcase_01 AC 26 ms
9,048 KB
testcase_02 AC 24 ms
9,012 KB
testcase_03 AC 24 ms
9,220 KB
testcase_04 AC 24 ms
9,092 KB
testcase_05 AC 24 ms
9,124 KB
testcase_06 AC 24 ms
9,176 KB
testcase_07 AC 25 ms
9,004 KB
testcase_08 AC 25 ms
9,172 KB
testcase_09 AC 25 ms
8,956 KB
testcase_10 AC 24 ms
9,184 KB
testcase_11 AC 25 ms
8,916 KB
testcase_12 AC 23 ms
9,136 KB
testcase_13 AC 27 ms
9,152 KB
testcase_14 AC 24 ms
9,196 KB
testcase_15 AC 24 ms
9,124 KB
testcase_16 AC 25 ms
9,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import re

A = input()
B = input()

pattern = re.compile('^(0|[1-9]\d*)$')


def check(s):
    if pattern.match(s) and 0 <= int(s) <= 12345:
        return True
    else:
        return False


if check(A) and check(B):
    print('OK')
else:
    print('NG')
0