結果

問題 No.944 煎っぞ!
ユーザー 👑 jupirojupiro
提出日時 2020-02-10 14:37:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 537 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 18,612 KB
最終ジャッジ日時 2024-04-08 13:00:00
合計ジャッジ時間 5,562 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 210 ms
15,724 KB
testcase_01 AC 143 ms
15,728 KB
testcase_02 AC 178 ms
15,724 KB
testcase_03 AC 164 ms
15,728 KB
testcase_04 AC 247 ms
15,744 KB
testcase_05 AC 118 ms
15,736 KB
testcase_06 AC 149 ms
15,740 KB
testcase_07 AC 169 ms
15,744 KB
testcase_08 AC 224 ms
15,732 KB
testcase_09 AC 126 ms
15,728 KB
testcase_10 AC 32 ms
10,112 KB
testcase_11 AC 55 ms
11,648 KB
testcase_12 AC 43 ms
11,008 KB
testcase_13 AC 31 ms
10,112 KB
testcase_14 AC 67 ms
11,648 KB
testcase_15 AC 42 ms
10,752 KB
testcase_16 WA -
testcase_17 AC 31 ms
10,112 KB
testcase_18 AC 54 ms
11,648 KB
testcase_19 AC 54 ms
11,648 KB
testcase_20 AC 139 ms
18,092 KB
testcase_21 AC 144 ms
18,092 KB
testcase_22 AC 121 ms
15,468 KB
testcase_23 AC 139 ms
15,596 KB
testcase_24 AC 225 ms
15,596 KB
testcase_25 AC 136 ms
15,596 KB
testcase_26 AC 119 ms
15,596 KB
testcase_27 AC 138 ms
17,068 KB
testcase_28 AC 31 ms
10,112 KB
testcase_29 AC 30 ms
10,112 KB
testcase_30 AC 184 ms
18,612 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a = list(map(int,input().split()))

sm = 0
d = []
for e in a:
    sm += e

for i in range(1, sm + 1):
    if(i * i > sm):
        break
    if sm % i == 0:
        d.append(i)
        if i != sm // i:
            d.append(sm/i)

d.sort(reverse = True)

for e in d:
    flag = True
    g = sm//e
    b = a.copy()
    for i in range(len(b)):
        if b[i] > g:
            flag = False
            break
        if b[i] < g and i != len(b) - 1:
            b[i + 1] += b[i]
    if flag :
        print(e)
        exit()
0