Submission #334812

#TimeUsernameProblemLanguageResultExecution timeMemory
334812limabeansRack (eJOI19_rack)Cpython 3
40 / 100
31 ms3692 KiB
readints=lambda:map(int, input().strip('\n').split()) mod=10**9+7 n,k=readints() def f(n,k): if n==0: return 1 if k>(2**n)//2: return 2*f(n-1,k-(2**n)//2) else: return 2*f(n-1,k)-1 res = f(n,k) res %= mod res += mod res %= mod print(res)
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...