結果
| 問題 |
No.944 煎っぞ!
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-02-01 22:58:31 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 476 bytes |
| コンパイル時間 | 113 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 44,844 KB |
| 最終ジャッジ日時 | 2024-09-18 20:24:09 |
| 合計ジャッジ時間 | 17,630 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 35 |
ソースコード
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)
exists = np.zeros(S+1, np.bool)
exists[Acum] = 1
for d in div:
if np.all(exists[np.arange(d,S,d)]):
answer = S // d
break
print(answer)
maspy