結果

問題 No.933 おまわりさんこいつです
コンテスト
ユーザー momotaros300
提出日時 2019-11-29 21:50:32
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 423 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 528 ms
コンパイル使用メモリ 20,572 KB
実行使用メモリ 32,896 KB
最終ジャッジ日時 2026-05-15 03:11:53
合計ジャッジ時間 8,107 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 RE * 5 TLE * 1 -- * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans =tmp=0
count = 1

n=int(input())
P=list(map(int,input().split()))
for i in range(n):
    count*=P[i]
while len(str(count))!=1:
    tmp=0
    for si in str(count):
        tmp+=int(si)
    count=tmp
print(count)
# print(ans)
0