結果
| 問題 | No.3542 Progression (Python) |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2026-05-16 15:31:30 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 2,000 ms |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 406 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 60,928 KB |
| スコア | 266 |
| 最終ジャッジ日時 | 2026-05-16 15:31:37 |
| 合計ジャッジ時間 | 5,879 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 29 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
ans = 1
for left_idx in range(N - 1):
diff = A[left_idx + 1] - A[left_idx]
for right_idx in range(left_idx + 1, N):
if A[right_idx] - A[right_idx - 1] != diff:
break
if ans < right_idx - left_idx + 1:
ans = right_idx - left_idx + 1
print(ans)