結果

問題 No.1869 Doubling?
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2022-03-11 21:36:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 289 bytes
コンパイル時間 1,093 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 71,624 KB
最終ジャッジ日時 2023-10-14 06:29:28
合計ジャッジ時間 5,932 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,316 KB
testcase_01 AC 76 ms
71,320 KB
testcase_02 AC 77 ms
71,456 KB
testcase_03 AC 77 ms
71,172 KB
testcase_04 AC 79 ms
71,260 KB
testcase_05 AC 74 ms
71,420 KB
testcase_06 AC 76 ms
71,076 KB
testcase_07 AC 77 ms
71,228 KB
testcase_08 AC 76 ms
71,412 KB
testcase_09 WA -
testcase_10 AC 82 ms
71,256 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 77 ms
71,220 KB
testcase_16 AC 77 ms
71,324 KB
testcase_17 AC 76 ms
71,332 KB
testcase_18 AC 77 ms
71,612 KB
testcase_19 AC 79 ms
71,228 KB
testcase_20 AC 75 ms
71,360 KB
testcase_21 AC 76 ms
71,388 KB
testcase_22 AC 77 ms
71,556 KB
testcase_23 AC 79 ms
71,364 KB
testcase_24 AC 79 ms
71,392 KB
testcase_25 AC 80 ms
71,396 KB
testcase_26 AC 78 ms
71,364 KB
testcase_27 AC 79 ms
71,344 KB
testcase_28 AC 78 ms
71,316 KB
testcase_29 AC 79 ms
71,488 KB
testcase_30 AC 77 ms
71,336 KB
testcase_31 AC 79 ms
71,456 KB
testcase_32 AC 78 ms
71,396 KB
testcase_33 AC 77 ms
71,392 KB
testcase_34 AC 75 ms
71,424 KB
testcase_35 AC 76 ms
71,348 KB
testcase_36 AC 76 ms
71,316 KB
testcase_37 AC 78 ms
71,416 KB
testcase_38 AC 77 ms
71,368 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 77 ms
71,428 KB
testcase_43 AC 75 ms
71,120 KB
testcase_44 WA -
testcase_45 AC 76 ms
71,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

奇数なら, +1 して//2

"""

import sys
from sys import stdin
import heapq

N,M = map(int,stdin.readline().split())

NN,MM = N,M

ans = 0
while MM > 1 and NN > 0:

    ans += MM
    NN -= 1
    MM = (MM+1)//2

if NN >= 0:
    print (ans + NN)
    sys.exit()

print (2**N-1)
    
0