結果

問題 No.944 煎っぞ!
コンテスト
ユーザー maspy
提出日時 2020-02-01 22:56:29
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
MLE  
実行時間 -
コード長 434 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 569 ms
コンパイル使用メモリ 20,700 KB
実行使用メモリ 639,492 KB
最終ジャッジ日時 2026-04-06 20:43:26
合計ジャッジ時間 40,441 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33 MLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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