結果
問題 |
No.2053 12345...
|
ユーザー |
![]() |
提出日時 | 2025-03-20 21:09:46 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 105 ms / 2,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 163 ms |
コンパイル使用メモリ | 82,576 KB |
実行使用メモリ | 103,516 KB |
最終ジャッジ日時 | 2025-03-20 21:10:30 |
合計ジャッジ時間 | 3,667 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 31 |
ソースコード
n = int(input()) a = list(map(int, input().split())) result = 0 current_run = 0 for i in range(1, n): if a[i] - a[i-1] == 1: current_run += 1 else: current_run = 0 result += current_run print(result)