結果
| 問題 |
No.933 おまわりさんこいつです
|
| コンテスト | |
| ユーザー |
uni_python
|
| 提出日時 | 2020-10-15 23:16:11 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 485 bytes |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 91,136 KB |
| 最終ジャッジ日時 | 2024-07-20 20:05:50 |
| 合計ジャッジ時間 | 3,169 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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):
temp=0
while x!=0:
temp+=x%10
x=x//10
return temp
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