結果

問題 No.933 おまわりさんこいつです
ユーザー neterukunneterukun
提出日時 2019-11-29 21:55:16
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 415 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 128,220 KB
最終ジャッジ日時 2024-04-30 23:28:11
合計ジャッジ時間 3,756 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,564 KB
testcase_01 AC 35 ms
53,088 KB
testcase_02 AC 36 ms
52,640 KB
testcase_03 AC 37 ms
53,548 KB
testcase_04 AC 36 ms
53,156 KB
testcase_05 AC 35 ms
52,752 KB
testcase_06 AC 36 ms
53,940 KB
testcase_07 AC 35 ms
52,160 KB
testcase_08 AC 33 ms
52,620 KB
testcase_09 AC 33 ms
52,820 KB
testcase_10 AC 34 ms
52,880 KB
testcase_11 AC 36 ms
59,092 KB
testcase_12 AC 36 ms
60,472 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 80 ms
89,008 KB
testcase_18 AC 34 ms
52,072 KB
testcase_19 AC 108 ms
94,688 KB
testcase_20 RE -
testcase_21 AC 33 ms
52,168 KB
testcase_22 AC 32 ms
53,768 KB
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
p = list(map(int, input().split()))


while True:
    tmp = []
    if len(p) % 2 == 1:
        tmp.append(p[-1])
    for i in range(n//2):
        tmp.append(p[2*i]*p[2*i+1])
    p = tmp[0:]
    n = len(p)
    if n == 1:
        ans = p[0]
        break

while True:
    if len(str(ans)) == 1:
        print(ans)
        break
    tmp = 0
    for i in str(ans):
        tmp += int(i)
    ans = tmp
0