結果
問題 | No.1869 Doubling? |
ユーザー |
![]() |
提出日時 | 2022-03-12 07:15:09 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 148 bytes |
コンパイル時間 | 1,009 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 52,096 KB |
最終ジャッジ日時 | 2024-09-16 12:41:29 |
合計ジャッジ時間 | 3,402 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
N, M = map(int, input().split()) s, c = 0, 0 while M!=1: s += M c += 1 M = (M+1)//2 if c<N: print(s+N-c) else: print((1<<N)-1)