結果
| 問題 | No.2486 Don't come next to me |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-29 21:03:33 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WJ
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 207 bytes |
| 記録 | |
| 最終ジャッジ日時 | 2026-08-23 08:58:39 |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
ソースコード
n, m = map(int, input().split()) a = list(map(int, input().split())) ans = 0 for i in range(1, m): d = a[i] - a[i - 1] x = d p = 1 while x >= 4 and x % 2 == 0: x //= 2 p *= 2 ans += d - p print(ans)