結果

問題 No.944 煎っぞ!
ユーザー chinchillachinchilla
提出日時 2020-01-11 15:47:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 102 ms / 3,000 ms
コード長 234 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 17,220 KB
最終ジャッジ日時 2024-05-03 20:35:09
合計ジャッジ時間 4,105 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
12,980 KB
testcase_01 AC 81 ms
13,108 KB
testcase_02 AC 80 ms
12,980 KB
testcase_03 AC 83 ms
13,108 KB
testcase_04 AC 102 ms
13,116 KB
testcase_05 AC 79 ms
12,988 KB
testcase_06 AC 89 ms
12,860 KB
testcase_07 AC 79 ms
12,992 KB
testcase_08 AC 83 ms
12,984 KB
testcase_09 AC 82 ms
12,984 KB
testcase_10 AC 30 ms
10,624 KB
testcase_11 AC 41 ms
11,904 KB
testcase_12 AC 35 ms
11,264 KB
testcase_13 AC 30 ms
10,752 KB
testcase_14 AC 42 ms
11,776 KB
testcase_15 AC 34 ms
11,136 KB
testcase_16 AC 30 ms
10,624 KB
testcase_17 AC 31 ms
10,624 KB
testcase_18 AC 41 ms
11,776 KB
testcase_19 AC 41 ms
11,904 KB
testcase_20 AC 87 ms
16,668 KB
testcase_21 AC 87 ms
16,788 KB
testcase_22 AC 76 ms
12,484 KB
testcase_23 AC 79 ms
12,356 KB
testcase_24 AC 86 ms
12,612 KB
testcase_25 AC 76 ms
12,484 KB
testcase_26 AC 77 ms
12,488 KB
testcase_27 AC 78 ms
16,292 KB
testcase_28 AC 30 ms
10,624 KB
testcase_29 AC 30 ms
10,752 KB
testcase_30 AC 86 ms
17,220 KB
testcase_31 AC 75 ms
12,484 KB
testcase_32 AC 73 ms
12,612 KB
testcase_33 AC 79 ms
14,448 KB
testcase_34 AC 76 ms
14,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split(" ")))
t = sum(a)
d = 0
for i in range(n):
	d += a[i]
	if t % d == 0:
		r = 0
		for b in a[i+1:]:
			r += b
			if r > d: break
			if r == d: r = 0
		if r == 0:
			print(t // d)
			break
0