結果
| 問題 | No.933 おまわりさんこいつです |
| コンテスト | |
| ユーザー |
uni_python
|
| 提出日時 | 2020-10-15 23:18:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 506 bytes |
| コンパイル時間 | 274 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 88,064 KB |
| 最終ジャッジ日時 | 2024-07-20 20:05:57 |
| 合計ジャッジ時間 | 2,207 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 18 |
ソースコード
import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def main():
mod=10**9+7
N=I()
P=LI()
def ch(x):
if x==0:
return 0
res=x%9
if res==0:
res=9
return res
ans=0
for i in range(N):
P[i]=ch(P[i])
ans+=P[i]
while ans>=10:
ans=ch(ans)
print(ans)
main()
uni_python