結果
問題 |
No.944 煎っぞ!
|
ユーザー |
|
提出日時 | 2020-11-22 02:09:20 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 454 bytes |
コンパイル時間 | 182 ms |
コンパイル使用メモリ | 82,424 KB |
実行使用メモリ | 103,616 KB |
最終ジャッジ日時 | 2024-07-23 16:10:39 |
合計ジャッジ時間 | 9,300 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 34 |
ソースコード
from itertools import accumulate N = int(input()) a = list(map(int,input().split())) ac = list(accumulate(a)) for i in range(N): j,k = i,i num = ac[i] flg = False count = 1 while j < N-1: j += 1 if num == ac[j]-ac[k]: count += 1 k = j if j == N-1: flg = True elif num < ac[j]-ac[k]: break if flg: print(count) exit() print(1)