結果
問題 | No.944 煎っぞ! |
ユーザー | rlangevin |
提出日時 | 2023-01-12 12:36:11 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 462 bytes |
コンパイル時間 | 887 ms |
コンパイル使用メモリ | 86,912 KB |
実行使用メモリ | 104,504 KB |
最終ジャッジ日時 | 2023-08-24 20:23:31 |
合計ジャッジ時間 | 7,880 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 103 ms
104,324 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 104 ms
103,880 KB |
testcase_06 | WA | - |
testcase_07 | AC | 102 ms
103,896 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 76 ms
76,764 KB |
testcase_13 | AC | 70 ms
71,144 KB |
testcase_14 | AC | 78 ms
79,292 KB |
testcase_15 | WA | - |
testcase_16 | AC | 70 ms
71,464 KB |
testcase_17 | AC | 70 ms
71,356 KB |
testcase_18 | AC | 79 ms
79,096 KB |
testcase_19 | WA | - |
testcase_20 | AC | 104 ms
104,316 KB |
testcase_21 | AC | 104 ms
104,504 KB |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | AC | 103 ms
104,072 KB |
testcase_32 | AC | 103 ms
104,200 KB |
testcase_33 | WA | - |
testcase_34 | AC | 106 ms
104,388 KB |
ソースコード
def div(n): i = 1 SS = set() while i * i <= n: if n % i == 0: SS.add(i) SS.add(n//i) i += 1 return SS N = int(input()) A = list(map(int, input().split())) Ac = [0] * (N + 1) for i in range(N): Ac[i + 1] = Ac[i] + A[i] S = set(Ac) ans = 0 M = Ac[-1] for d in div(M): now = d for v in range(M//d): if now not in S: break else: ans = max(ans, M//d) print(ans)