結果

問題 No.933 おまわりさんこいつです
ユーザー yuly3yuly3
提出日時 2020-01-07 09:50:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 296 bytes
コンパイル時間 226 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 57,700 KB
最終ジャッジ日時 2024-05-02 11:14:56
合計ジャッジ時間 17,957 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 529 ms
49,696 KB
testcase_01 AC 537 ms
44,404 KB
testcase_02 AC 537 ms
44,184 KB
testcase_03 AC 533 ms
44,068 KB
testcase_04 AC 531 ms
44,320 KB
testcase_05 AC 529 ms
44,316 KB
testcase_06 AC 534 ms
43,800 KB
testcase_07 AC 531 ms
44,188 KB
testcase_08 AC 534 ms
44,064 KB
testcase_09 AC 538 ms
44,568 KB
testcase_10 AC 536 ms
43,924 KB
testcase_11 AC 535 ms
44,192 KB
testcase_12 AC 534 ms
43,800 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 561 ms
48,412 KB
testcase_18 AC 551 ms
44,184 KB
testcase_19 AC 642 ms
50,340 KB
testcase_20 RE -
testcase_21 AC 546 ms
43,928 KB
testcase_22 AC 542 ms
43,928 KB
testcase_23 TLE -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np


def solve():
    N, *P = map(int, open(0).read().split())

    K = 1
    for p in P:
        K *= p
    K = str(K)
    while len(K) != 1:
        num = 0
        for k in K:
            num += int(k)
        K = str(num)
    print(K)


if __name__ == '__main__':
    solve()
0