結果
| 問題 |
No.933 おまわりさんこいつです
|
| コンテスト | |
| ユーザー |
uni_python
|
| 提出日時 | 2020-10-15 23:19:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 857 ms / 2,000 ms |
| コード長 | 506 bytes |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 81,848 KB |
| 実行使用メモリ | 91,136 KB |
| 最終ジャッジ日時 | 2024-07-20 20:06:02 |
| 合計ジャッジ時間 | 3,958 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
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=1
for i in range(N):
P[i]=ch(P[i])
ans*=P[i]
while ans>=10:
ans=ch(ans)
print(ans)
main()
uni_python