結果
| 問題 | No.3542 Progression (Python) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-14 17:12:20 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 70 ms / 2,000 ms |
| + 865µs | |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 95,972 KB |
| 実行使用メモリ | 83,456 KB |
| スコア | 266 |
| 最終ジャッジ日時 | 2026-08-14 17:12:28 |
| 合計ジャッジ時間 | 7,884 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_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)