結果

問題 No.446 ゆきこーだーの雨と雪 (1)
コンテスト
ユーザー JunOnuma
提出日時 2017-06-08 19:00:16
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 77,184 KB
最終ジャッジ日時 2025-12-04 00:00:21
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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