結果

問題 No.933 おまわりさんこいつです
ユーザー otsuri_114514otsuri_114514
提出日時 2019-11-29 21:57:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 728 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 20,804 KB
最終ジャッジ日時 2023-08-13 05:26:55
合計ジャッジ時間 5,347 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,772 KB
testcase_01 AC 16 ms
7,888 KB
testcase_02 AC 15 ms
7,876 KB
testcase_03 AC 16 ms
7,740 KB
testcase_04 AC 15 ms
7,888 KB
testcase_05 AC 16 ms
7,856 KB
testcase_06 AC 16 ms
7,840 KB
testcase_07 AC 16 ms
7,772 KB
testcase_08 AC 15 ms
7,744 KB
testcase_09 AC 15 ms
7,860 KB
testcase_10 AC 15 ms
7,860 KB
testcase_11 AC 16 ms
7,812 KB
testcase_12 AC 17 ms
7,740 KB
testcase_13 AC 29 ms
8,204 KB
testcase_14 AC 35 ms
8,596 KB
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 317 ms
17,076 KB
testcase_18 AC 16 ms
7,744 KB
testcase_19 AC 408 ms
19,504 KB
testcase_20 RE -
testcase_21 AC 15 ms
7,776 KB
testcase_22 AC 15 ms
7,732 KB
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#import pysnooper
#import numpy
#import os,re,sys,operator
#from collections import Counter,deque
#from operator import itemgetter
#from itertools import accumulate,combinations,groupby,combinations_with_replacement,permutations
from sys import stdin,setrecursionlimit
#from bisect import bisect_left,bisect_right
#from copy import deepcopy
#import heapq
#import math
#import string
#from time import time
#from functools import lru_cache
setrecursionlimit(10**6)
input=stdin.readline

n=int(input().rstrip())
p=[int(i) for i in input().split()]
tmp=1
for i in p:
    now=i
    while len(str(now))!=1:
        now=sum(list(map(int,str(now))))
    tmp*=now

while len(str(tmp))!=1:
    tmp=sum(list(map(int,str(tmp))))
print(tmp)
0