Submission #2975508


Source Code Expand

from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
AtoZ = [chr(i) for i in range(65,65+26)]
atoz = [chr(i) for i in range(97,97+26)]

def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N,S,T = inpl()
ans = 0

def DOWN(x,n):
	if x == S:
		print(n)
		return True
	elif x < S:
		return False
	else:
		return DOWN(x//2,n+1)

if not DOWN(T,0):
	print(-1)

Submission Info

Submission Time
Task B - Camphor Tree
User simamumu
Language Python (3.4.3)
Score 100
Code Size 539 Byte
Status AC
Exec Time 29 ms
Memory 4204 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 13
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 29 ms 4204 KB
01_sample AC 29 ms 4200 KB
02_sample AC 29 ms 4196 KB
max_01 AC 29 ms 4200 KB
max_02 AC 29 ms 4204 KB
max_03 AC 29 ms 4200 KB
max_04 AC 29 ms 4200 KB
max_05 AC 29 ms 4200 KB
max_06 AC 29 ms 4196 KB
max_07 AC 29 ms 4196 KB
max_08 AC 29 ms 4200 KB
max_09 AC 29 ms 4196 KB
min_00 AC 29 ms 4196 KB