結果
問題 |
No.2486 Don't come next to me
|
ユーザー |
|
提出日時 | 2023-09-29 22:07:22 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 190 bytes |
コンパイル時間 | 238 ms |
コンパイル使用メモリ | 82,392 KB |
実行使用メモリ | 107,484 KB |
最終ジャッジ日時 | 2024-07-22 16:07:28 |
合計ジャッジ時間 | 3,156 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 20 |
ソースコード
n,m = map(int,input().split()) A = list(map(int,input().split())) ans = 0 for a,na in zip(A,A[1:]): d = na-a-1 if d%2 == 1: ans += d if d != 1: ans -= 1 else: ans += d print(ans)