結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2020-08-02 17:05:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,580 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2023-09-26 01:51:09
合計ジャッジ時間 1,371 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,952 KB
testcase_01 AC 15 ms
7,792 KB
testcase_02 AC 15 ms
7,852 KB
testcase_03 AC 16 ms
7,792 KB
testcase_04 AC 15 ms
7,900 KB
testcase_05 AC 15 ms
7,760 KB
testcase_06 AC 15 ms
7,844 KB
testcase_07 AC 15 ms
7,792 KB
testcase_08 AC 15 ms
7,968 KB
testcase_09 AC 15 ms
7,968 KB
testcase_10 AC 15 ms
7,832 KB
testcase_11 AC 15 ms
7,852 KB
testcase_12 AC 15 ms
7,840 KB
testcase_13 AC 15 ms
7,848 KB
testcase_14 AC 16 ms
7,792 KB
testcase_15 AC 15 ms
7,852 KB
testcase_16 AC 15 ms
7,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def judge(a):
    if len(a) > 1 and a[0] == "0": return False

    for c in a:
        if ord("0") <= ord(c) <= ord("9"): pass
        else: return False

    if int(a) > 12345: return False
    return True


a = input()
b = input()

if judge(a) and judge(b): print("OK")
else: print("NG")
0