結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー hoshiimo28hoshiimo28
提出日時 2016-11-18 23:40:54
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 515 bytes
コンパイル時間 39 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2024-05-04 18:56:52
合計ジャッジ時間 764 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
6,272 KB
testcase_01 AC 9 ms
6,272 KB
testcase_02 AC 10 ms
6,272 KB
testcase_03 AC 10 ms
6,272 KB
testcase_04 AC 9 ms
6,144 KB
testcase_05 AC 10 ms
6,272 KB
testcase_06 AC 10 ms
6,144 KB
testcase_07 AC 10 ms
6,272 KB
testcase_08 AC 10 ms
6,272 KB
testcase_09 AC 10 ms
6,272 KB
testcase_10 AC 10 ms
6,272 KB
testcase_11 AC 10 ms
6,144 KB
testcase_12 AC 9 ms
6,272 KB
testcase_13 WA -
testcase_14 AC 9 ms
6,272 KB
testcase_15 AC 9 ms
6,144 KB
testcase_16 AC 9 ms
6,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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