結果

問題 No.944 煎っぞ!
ユーザー maspy
提出日時 2020-02-01 22:56:29
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
MLE  
実行時間 -
コード長 434 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 643,088 KB
最終ジャッジ日時 2024-09-18 20:23:44
合計ジャッジ時間 30,018 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33 MLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

A = np.fromstring(read(), np.int64, sep=' ')[1:]

Acum = np.cumsum(A)

S = Acum[-1]
x = np.arange(1, int(S**.5)+1, dtype=np.int64)
div = x[S%x == 0]
div = np.union1d(div, S // div)

se = set(Acum)
for d in div:
    if set(np.arange(d,S,d)) <= se:
        answer = S//d
        break

print(answer)
0