結果

問題 No.933 おまわりさんこいつです
ユーザー kohei2019kohei2019
提出日時 2022-01-04 21:48:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 247 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 138 ms
コンパイル使用メモリ 82,796 KB
実行使用メモリ 91,252 KB
最終ジャッジ日時 2024-04-23 01:07:27
合計ジャッジ時間 3,078 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
51,876 KB
testcase_01 AC 34 ms
52,404 KB
testcase_02 AC 34 ms
52,952 KB
testcase_03 AC 33 ms
52,764 KB
testcase_04 AC 35 ms
52,372 KB
testcase_05 AC 36 ms
52,680 KB
testcase_06 AC 35 ms
52,456 KB
testcase_07 AC 34 ms
52,396 KB
testcase_08 AC 36 ms
53,704 KB
testcase_09 AC 39 ms
60,936 KB
testcase_10 AC 44 ms
59,572 KB
testcase_11 AC 53 ms
66,288 KB
testcase_12 AC 52 ms
69,160 KB
testcase_13 AC 75 ms
76,568 KB
testcase_14 AC 77 ms
76,632 KB
testcase_15 AC 83 ms
76,744 KB
testcase_16 AC 113 ms
79,028 KB
testcase_17 AC 41 ms
63,192 KB
testcase_18 AC 35 ms
52,448 KB
testcase_19 AC 46 ms
67,568 KB
testcase_20 AC 125 ms
85,788 KB
testcase_21 AC 34 ms
52,532 KB
testcase_22 AC 32 ms
52,484 KB
testcase_23 AC 226 ms
91,252 KB
testcase_24 AC 247 ms
90,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
lsP = input().split()
def func(p):
    ls = list(p)
    while len(ls) >= 2:
        wa = [int(a) for a in ls]
        ls = list(str(sum(wa)))
    return ls[0]
if '0' in lsP:
    print(0)
    exit()
ans = 1
for i in range(N):
    ans *= int(func(lsP[i]))
    ans = func(str(ans))
print(ans)
0