結果

問題 No.3542 Progression (Python)
コンテスト
ユーザー まぬお
提出日時 2026-05-16 17:12:56
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 148 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 140 ms
コンパイル使用メモリ 85,248 KB
実行使用メモリ 59,904 KB
スコア 440
最終ジャッジ日時 2026-05-16 17:13:03
合計ジャッジ時間 5,478 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N=int(input())
A=list(map(int,input().split()))
d=.1
c=2
a=1
for x,y in zip(A,A[1:]):
    if d==y-x:c+=1
    else:c,d=2,y-x
    a=max(a,c)
print(a)
0