結果

問題 No.944 煎っぞ!
ユーザー matriematrie
提出日時 2020-12-25 09:50:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 123 ms / 3,000 ms
コード長 250 bytes
コンパイル時間 627 ms
コンパイル使用メモリ 11,920 KB
実行使用メモリ 18,516 KB
最終ジャッジ日時 2023-10-22 01:17:21
合計ジャッジ時間 5,004 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
12,296 KB
testcase_01 AC 77 ms
12,300 KB
testcase_02 AC 88 ms
12,296 KB
testcase_03 AC 87 ms
12,300 KB
testcase_04 AC 123 ms
12,316 KB
testcase_05 AC 63 ms
12,308 KB
testcase_06 AC 81 ms
12,312 KB
testcase_07 AC 102 ms
12,316 KB
testcase_08 AC 110 ms
12,304 KB
testcase_09 AC 63 ms
12,300 KB
testcase_10 AC 25 ms
10,080 KB
testcase_11 AC 37 ms
11,540 KB
testcase_12 AC 32 ms
10,772 KB
testcase_13 AC 26 ms
10,012 KB
testcase_14 AC 41 ms
11,532 KB
testcase_15 AC 28 ms
10,616 KB
testcase_16 AC 25 ms
10,012 KB
testcase_17 AC 26 ms
10,016 KB
testcase_18 AC 37 ms
11,540 KB
testcase_19 AC 35 ms
11,532 KB
testcase_20 AC 80 ms
17,592 KB
testcase_21 AC 81 ms
17,588 KB
testcase_22 AC 67 ms
11,808 KB
testcase_23 AC 73 ms
11,808 KB
testcase_24 AC 105 ms
11,808 KB
testcase_25 AC 74 ms
11,808 KB
testcase_26 AC 68 ms
11,808 KB
testcase_27 AC 68 ms
17,140 KB
testcase_28 AC 25 ms
10,012 KB
testcase_29 AC 24 ms
10,012 KB
testcase_30 AC 94 ms
18,516 KB
testcase_31 AC 73 ms
11,808 KB
testcase_32 AC 68 ms
11,808 KB
testcase_33 AC 72 ms
14,564 KB
testcase_34 AC 75 ms
14,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=list(map(int,input().split()))
t=sum(l)

k=1
d=[]
while k*k<=t:
	if t%k<1: d+=[k,t//k]
	k+=1
d=sorted(list(set(d)))

for m in d:
	b=c=0
	for j in range(n):
		b+=l[j]
		if b>m: break
		elif b==m: c+=1; b=0
	if c*m==t: print(c); break
0