結果

問題 No.944 煎っぞ!
ユーザー pluto77pluto77
提出日時 2020-07-01 11:39:41
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 1,049 ms / 3,000 ms
コード長 261 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,808 KB
実行使用メモリ 16,068 KB
最終ジャッジ日時 2023-10-11 22:02:37
合計ジャッジ時間 8,749 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 180 ms
10,508 KB
testcase_01 AC 166 ms
10,536 KB
testcase_02 AC 179 ms
10,500 KB
testcase_03 AC 171 ms
10,628 KB
testcase_04 AC 205 ms
10,328 KB
testcase_05 AC 166 ms
10,260 KB
testcase_06 AC 182 ms
10,464 KB
testcase_07 AC 179 ms
10,404 KB
testcase_08 AC 193 ms
10,712 KB
testcase_09 AC 156 ms
10,464 KB
testcase_10 AC 16 ms
7,756 KB
testcase_11 AC 44 ms
9,764 KB
testcase_12 AC 23 ms
8,932 KB
testcase_13 AC 15 ms
7,760 KB
testcase_14 AC 213 ms
9,764 KB
testcase_15 AC 22 ms
8,684 KB
testcase_16 AC 16 ms
7,788 KB
testcase_17 AC 15 ms
7,760 KB
testcase_18 AC 45 ms
9,756 KB
testcase_19 AC 45 ms
9,688 KB
testcase_20 AC 964 ms
15,676 KB
testcase_21 AC 978 ms
15,620 KB
testcase_22 AC 74 ms
9,908 KB
testcase_23 AC 81 ms
10,080 KB
testcase_24 AC 113 ms
10,000 KB
testcase_25 AC 81 ms
10,024 KB
testcase_26 AC 76 ms
9,952 KB
testcase_27 AC 61 ms
15,372 KB
testcase_28 AC 16 ms
7,828 KB
testcase_29 AC 15 ms
7,760 KB
testcase_30 AC 1,049 ms
16,068 KB
testcase_31 AC 53 ms
10,032 KB
testcase_32 AC 56 ms
9,896 KB
testcase_33 AC 60 ms
12,784 KB
testcase_34 AC 59 ms
12,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki944

n=int(input())
a=list(map(int,input().split()))
s=sum(a)
i=max(a)
while i<=s:
 if s%i:
  i+=1
  continue
 cnt=0
 for j in range(n):
  if cnt<i:
   cnt+=a[j]
  elif cnt==i:
   cnt=a[j]
  else:
   cnt=0
   break
 if cnt==i:
  print(s//i)
  break
 i+=1
 
0