結果
問題 |
No.2486 Don't come next to me
|
ユーザー |
![]() |
提出日時 | 2023-09-29 21:29:51 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 254 ms / 2,000 ms |
コード長 | 186 bytes |
コンパイル時間 | 289 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 32,672 KB |
最終ジャッジ日時 | 2024-07-22 15:30:16 |
合計ジャッジ時間 | 4,389 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
n,m = map(int,input().split()) a = list(map(int,input().split())) ans = n-m for i in range(m-1): x = 1; d = a[i+1]-a[i] while d>2 and d%2==0: ans -= x; x *= 2; d //= 2 print(ans)