結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー JunOnuma
提出日時 2017-06-08 19:00:16
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 7,068 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 13:34:34
合計ジャッジ時間 870 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

def check(s):
    for c in s:
        if ord(c) < ord('0') or ord('9') < ord(c):
            return False
    if len(s) > 1 and s[0] == '0':
        return False
    if int(s) > 12345:
        return False
    return True

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