結果
問題 |
No.1869 Doubling?
|
ユーザー |
|
提出日時 | 2022-10-05 02:12:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 346 bytes |
コンパイル時間 | 455 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 184,332 KB |
最終ジャッジ日時 | 2024-12-30 19:18:00 |
合計ジャッジ時間 | 42,532 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 TLE * 13 |
ソースコード
import sys import math sys.setrecursionlimit(67108864) n,m=list (map(int,input ().split())) def f(x,y): def a(x,y): return min(2**(x-1),y,) if x==1: return 1 elif y==1: return x elif 2**(x-1)<=y: return 2**x-1 else: return f(x-1,math.ceil(y/2))+a(x-1,math.ceil(y/2))*2-y%2 print(f(n,m))