結果

問題 No.944 煎っぞ!
ユーザー zer0zer0
提出日時 2020-01-13 16:29:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 47,132 KB
最終ジャッジ日時 2024-05-10 02:29:46
合計ジャッジ時間 22,589 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 567 ms
45,972 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 561 ms
45,592 KB
testcase_06 WA -
testcase_07 AC 564 ms
46,104 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 501 ms
43,804 KB
testcase_13 AC 491 ms
44,448 KB
testcase_14 AC 507 ms
43,928 KB
testcase_15 WA -
testcase_16 AC 482 ms
44,196 KB
testcase_17 AC 489 ms
44,188 KB
testcase_18 AC 504 ms
43,904 KB
testcase_19 WA -
testcase_20 AC 573 ms
46,736 KB
testcase_21 AC 579 ms
46,232 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 570 ms
46,100 KB
testcase_32 AC 561 ms
45,732 KB
testcase_33 WA -
testcase_34 AC 562 ms
45,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

N = int(input())
a = list(map(int, input().split()))
totala = sum(a)
rui = [0] * (N + 1)
for i in range(N):
    rui[i + 1] = a[i] + rui[i]
ans = 0
for i in range(1, N + 1):
    sho, mod = divmod(totala, rui[i])
    if mod == 0:
        ans = max(ans, sho)

print(ans)
0