結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー gorugo30
提出日時 2021-02-23 21:42:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 82,104 KB
実行使用メモリ 53,680 KB
最終ジャッジ日時 2024-09-22 15:55:53
合計ジャッジ時間 1,439 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

def isok(S):
    if S[0] == "0" and len(S) != 1:
        return False
    cnt = 0
    for i in range(10):
        cnt += S.count(str(i))
    if cnt != len(S):
        return False
    if 0 <= int(S) <= 12345:
        return True
    else:
        return False
    
A = input()
B = input()
if isok(A) and isok(B):
    print("OK")
else:
    print("NG")
0