Submission #3386680


Source Code Expand

def isleft(n):
  for i in range(1,25):
    if 2**i<=n<2**i+2**i-2**(i-1):
      return (True,i)
    elif 2**i+2**i-2**(i-1)<=n<2**(i+1):
      return (False,i)

n,s,t=map(int,input().split())
rs,rt=isleft(s),isleft(t)
print(rt[1]-rs[1] if s<=t and rs[0]==rt[0] else -1)

Submission Info

Submission Time
Task B - Camphor Tree
User tallestorange
Language Python (3.4.3)
Score 0
Code Size 278 Byte
Status RE
Exec Time 17 ms
Memory 3064 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 10
WA × 1
RE × 2
Set Name Test Cases
All 00_sample, 01_sample, 02_sample, max_01, max_02, max_03, max_04, max_05, max_06, max_07, max_08, max_09, min_00
Case Name Status Exec Time Memory
00_sample AC 17 ms 2940 KB
01_sample AC 17 ms 3064 KB
02_sample AC 17 ms 3064 KB
max_01 RE 17 ms 3060 KB
max_02 AC 17 ms 3064 KB
max_03 AC 17 ms 3060 KB
max_04 AC 17 ms 3060 KB
max_05 AC 17 ms 3064 KB
max_06 AC 17 ms 3064 KB
max_07 WA 17 ms 3060 KB
max_08 AC 17 ms 3060 KB
max_09 AC 17 ms 3060 KB
min_00 RE 17 ms 3064 KB