結果

問題 No.2486 Don't come next to me
ユーザー KeroruKeroru
提出日時 2023-09-29 22:08:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 166 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 129,988 KB
最終ジャッジ日時 2023-09-29 22:09:03
合計ジャッジ時間 4,539 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
118,588 KB
testcase_01 AC 142 ms
124,748 KB
testcase_02 AC 104 ms
87,544 KB
testcase_03 AC 121 ms
109,140 KB
testcase_04 AC 139 ms
122,760 KB
testcase_05 AC 121 ms
109,400 KB
testcase_06 AC 126 ms
113,608 KB
testcase_07 AC 88 ms
80,192 KB
testcase_08 AC 98 ms
89,104 KB
testcase_09 AC 141 ms
124,040 KB
testcase_10 AC 122 ms
109,564 KB
testcase_11 AC 107 ms
95,540 KB
testcase_12 AC 93 ms
83,388 KB
testcase_13 AC 166 ms
129,988 KB
testcase_14 AC 101 ms
90,896 KB
testcase_15 AC 120 ms
109,504 KB
testcase_16 AC 90 ms
81,112 KB
testcase_17 AC 98 ms
88,640 KB
testcase_18 AC 97 ms
87,428 KB
testcase_19 AC 100 ms
89,380 KB
testcase_20 AC 72 ms
71,180 KB
testcase_21 AC 72 ms
71,280 KB
testcase_22 AC 71 ms
71,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,*a=map(int,open(0).read().split())
p=[]
for i,j in zip(a,a[1:]):
    if j>i+1:
        p+=(j-i-1),
ans=n-m
for t in p:
    y=t
    c=1
    while y%2 and y>1:
        y=(y-1)//2
        ans-=c
        c*=2
print(ans)
0