結果
問題 | No.1869 Doubling? |
ユーザー |
|
提出日時 | 2022-03-12 11:42:57 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 156 bytes |
コンパイル時間 | 418 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-09-16 17:22:01 |
合計ジャッジ時間 | 3,219 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
#yuki1869 n,x=map(int,input().split()) if n<=60 and 2**(n-1)<=x: print(2**n-1) else: res=0 while x!=1: res+=x x=(x+1)//2 n-=1 res+=n print(res)