結果
| 問題 | No.3542 Progression (Python) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-06 23:40:51 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 168 bytes |
| 記録 | |
| コンパイル時間 | 218 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 59,904 KB |
| スコア | 420 |
| 最終ジャッジ日時 | 2026-05-16 15:05:28 |
| 合計ジャッジ時間 | 5,522 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 29 |
ソースコード
n=int(input()) a=list(map(int,input().split())) d=[a[i+1]-a[i] for i in range(n-1)] s=c=2 for i in range(n-2): c=c+1 if d[i+1]==d[i] else 2 s=max(s,c) print(min(s,n))