結果

問題 No.933 おまわりさんこいつです
ユーザー Novi
提出日時 2019-12-01 11:55:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 22,100 KB
最終ジャッジ日時 2024-11-21 04:33:26
合計ジャッジ時間 3,850 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 12 RE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

def digit(n):
    if n==0:
        return 0
    q=str(n)
    tmp=0
    for i in range(len(q)):
        tmp+=int(q[i])
    if tmp%9!=0:
        tmp%=9
    else:
        tmp=0
    return  tmp

n=int(input())
p=list(map(int,input().split()))
ct=1
for i in range(n):
    if p[i]%9==0:
        ct*=9
    else:
        ct*=(p[i]%9)

ans=digit(ct)
print(ans)
0