結果

問題 No.446 ゆきこーだーの雨と雪 (1)
コンテスト
ユーザー hoshiimo28
提出日時 2016-11-18 23:45:56
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 517 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 77,236 KB
最終ジャッジ日時 2025-12-03 22:47:06
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = raw_input()
m = raw_input()

if n.isdigit() == True and m.isdigit() == True:
    if int(n) >= 0 and int(n) <= 12345 and int(m) >= 0 and int(m) <= 12345:
        if len(str(n)) > 1 or len(str(m)) > 1:
            if n.startswith("0") == True and len(str(n)) > 1:
                print "NG"
            elif m.startswith("0") == True and len(str(m)) > 1:
                print "NG"
            else:
                print "OK"
        else:
            print "OK"
    else:
        print "NG"
else:
    print "NG"
0