結果
| 問題 | No.944 煎っぞ! |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-01-18 23:38:43 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 47 ms / 3,000 ms |
| + 333µs | |
| コード長 | 500 bytes |
| 記録 | |
| コンパイル時間 | 63 ms |
| コンパイル使用メモリ | 82,272 KB |
| 実行使用メモリ | 98,428 KB |
| 最終ジャッジ日時 | 2026-09-28 15:27:12 |
| 合計ジャッジ時間 | 3,976 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
n = int(input())
A = list(map(int, input().split()))
se = set()
tot = 0
for a in A:
tot += a
se.add(tot)
cand = []
for i in range(1, int(tot ** 0.5 + 1)):
if tot % i == 0:
cand.append(i)
if i != tot // i:
cand.append(tot // i)
cand.sort()
for c in cand:
if tot // c > n:
continue
ok = True
for i in range(c, tot + 1, c):
if i not in se:
ok = False
break
if ok:
print(tot // c)
break