結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー rocoder
提出日時 2017-05-20 09:36:11
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 614 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-09-19 00:24:04
合計ジャッジ時間 1,311 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 10 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

def num(x):
    if x=="1":
        return 1
    elif x=="2":
        return 1
    elif x=="3":
        return 1
    elif x=="4":
        return 1
    elif x=="5":
        return 1
    elif x=="6":
        return 1
    elif x=="7":
        return 1
    elif x=="8":
        return 1
    elif x=="9":
        return 1
    else:
        return 0
def nuli (l):
    n=1
    i=0
    while n==1 and i < len(l):
        if num(l[i])==0:
            n=0
        i+=1
    if len(l)>1 and l[0]==0:
         n=0
    return n
A=list(input())
B=list(input())
if nuli (A)==0 or nuli(B)==0:
    print ("NG")
else:
    print ("OK")
0