結果

問題 No.944 煎っぞ!
ユーザー chinchillachinchilla
提出日時 2020-01-12 12:55:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 88 ms / 3,000 ms
コード長 238 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,940 KB
最終ジャッジ日時 2024-05-06 12:33:04
合計ジャッジ時間 4,056 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
20,676 KB
testcase_01 AC 78 ms
20,684 KB
testcase_02 AC 78 ms
20,796 KB
testcase_03 AC 82 ms
20,800 KB
testcase_04 AC 83 ms
20,820 KB
testcase_05 AC 80 ms
20,688 KB
testcase_06 AC 77 ms
20,816 KB
testcase_07 AC 77 ms
20,940 KB
testcase_08 AC 75 ms
20,936 KB
testcase_09 AC 79 ms
20,804 KB
testcase_10 AC 27 ms
10,752 KB
testcase_11 AC 40 ms
14,324 KB
testcase_12 AC 32 ms
12,160 KB
testcase_13 AC 26 ms
10,752 KB
testcase_14 AC 39 ms
14,452 KB
testcase_15 AC 34 ms
11,904 KB
testcase_16 AC 25 ms
10,752 KB
testcase_17 AC 26 ms
10,624 KB
testcase_18 AC 40 ms
14,452 KB
testcase_19 AC 38 ms
14,320 KB
testcase_20 AC 86 ms
20,808 KB
testcase_21 AC 84 ms
20,732 KB
testcase_22 AC 77 ms
20,728 KB
testcase_23 AC 76 ms
20,728 KB
testcase_24 AC 80 ms
20,852 KB
testcase_25 AC 80 ms
20,600 KB
testcase_26 AC 76 ms
20,600 KB
testcase_27 AC 80 ms
20,660 KB
testcase_28 AC 26 ms
10,752 KB
testcase_29 AC 26 ms
10,624 KB
testcase_30 AC 88 ms
20,756 KB
testcase_31 AC 81 ms
20,600 KB
testcase_32 AC 73 ms
20,728 KB
testcase_33 AC 79 ms
20,752 KB
testcase_34 AC 81 ms
20,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate
input()
a = [int(w) for w in input().split(" ")]
t = sum(a)
s = set(accumulate(a))
print(next(r for r in range(t // max(a), 0, -1)
             if t % r == 0 and all(p in s for p in range(t//r, t, t//r))))
0