qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n=int(input())
if x>=400 and x<=599:
    print(8)
    exit()
if x>=600 and x<=799:
    print(7)
    exit()
if x>=800 and x<=999:
    print(6)
    exit()
if x>=1000 and x<=1199:
    print(5)
    exit()
if x>=1200 and x<=1399:
    print(4)
    exit()
if x>=1400 and x<=1599:
    print(3)
    exit()
if x>=1600 and x<=1799:
    print(2)
    exit()
if x>=1800 and x<=1999:
	print(1)
  	exit()
 

Fixed code:
x=int(input())
if x>=400 and x<=599:
    print(8)
    exit()
if x>=600 and x<=799:
    print(7)
    exit()
if x>=800 and x<=999:
    print(6)
    exit()
if x>=1000 and x<=1199:
    print(5)
    exit()
if x>=1200 and x<=1399:
    print(4)
    exit()
if x>=1400 and x<=1599:
    print(3)
    exit()
if x>=1600 and x<=1799:
    print(2)
    exit()
if x>=1800 and x<=1999:
    print(1)
    exit()
Buggy code:
x=input()
if 400<=x and x<600:
 rank=8
elif 600<=x and x<800:
  rank=7
elif 800<=x and x<1000:
  rank=6
elif 1000<=x and x<1200:
  rank=5
elif 1200<=x and x<1400:
  rank=4
elif 1400<=x and x<1600:
  rank=3
elif 1600<=x and x<1800:
  rank=2
elif 1800<=x and x<2000:
  rank =1
print(rank)


Fixed code:
x=input()
x=int(x)
if x>=400 and x<600:
  rank=8
elif 600<=x and x<800:
  rank=7
elif 800<=x and x<1000:
  rank=6
elif 1000<=x and x<1200:
  rank=5
elif 1200<=x and x<1400:
  rank=4
elif 1400<=x and x<1600:
  rank=3
elif 1600<=x and x<1800:
  rank=2
elif 1800<=x and x<2000:
  rank =1
print(rank)
Buggy code:
a=int(input())
print(max(8-(a-400)/200,1))

Fixed code:
a=int(input())
print(max(8-(a-400)//200,1))
Buggy code:
# -*- coding: utf-8 -*-

X=int(input())

400 <= X <=1999

if (400<= X <= 599):
    print("8")
elif (600<= X <=799):
    print("7")
elif(800<= X <=999):
    print("6")
elif(1000<= X <＝1199):
    print("5")    
elif(1200<= X <=1399):
    print("4")   
elif(1400<= X <=1599):
    print("3")   
elif(1600<= X <=1799):
    print("2")   
elif(1800<= X <=1999):
    print("1")   

Fixed code:
# -*- coding: utf-8 -*-

X=int(input())

400 <= X <=1999

if (400<= X <= 599):
    print("8")
elif (600<= X <=799):
    print("7")
elif(800<= X <=999):
    print("6")
elif(1000<= X <=1199):
    print("5")    
elif(1200<= X <=1399):
    print("4")   
elif(1400<= X <=1599):
    print("3")   
elif(1600<= X <=1799):
    print("2")
elif(1800<= X <=1999):
    print("1")
Buggy code:
X=int(input())
initial=400
kyu=8
for add in range(1,9):
  if X<initial+add*200:
    print(kyu)
    break
    kyu-=1

Fixed code:
X=int(input())
initial=400
kyu=8
for add in range(1,9):
    if X<initial+add*200:
        print(int(kyu))
        break
    kyu-=1
Buggy code:
n = int(input())

rate = 600
rank = 8

while true:
    if n < rate:
        print(rank)
        break
    rate += 200
    rank -= 1

Fixed code:
n = int(input())

rate = 600
rank = 8

while True:
    if n < rate:
        print(rank)
        break
    rate += 200
    rank -= 1
Buggy code:
X=input()
if X>=400 and X<=599:
  print(8)
elif X>=600 and X<=799:
  print(7)
elif X>=800 and X<=999:
  print(6)
elif X>=1000 and X<=1199:
  print(5)
elif X>=1200 and X<=1399:
  print(4)
elif X>=1400 and X<=1599:
  print(3)
elif X>=1600 and X<=1799:
  print(2)
elif X>=1800 and X<=1999:
  print(1)


Fixed code:
X=int(input())
if X>=400 and X<=599:
  print('8')
if X>=600 and X<=799:
  print('7')
if X>=800 and X<=999:
  print('6')
if X>=1000 and X<=1199:
  print('5')
if X>=1200 and X<=1399:
  print('4')
if X>=1400 and X<=1599:
  print('3')
if X>=1600 and X<=1799:
  print('2')
if X>=1800 and X<=1999:
  print('1')
Buggy code:
x = int(input())
sum = 600
for i in range(8, 0, -1):
    if x < sum:
        print(i)
        break
    sum += 20

Fixed code:
x = int(input())
sum = 600
for i in range(8, 0, -1):
    if x < sum:
        print(i)
        break
    sum += 200
Buggy code:
x = int(input())
def resolve():
    x = int(input())
    print(8 - ((x - 400) // 200))

resolve()

Fixed code:
def resolve():
    x = int(input())
    print(8 - ((x - 400) // 200))

resolve()
Buggy code:
X=input()
if X>=400 and X<=599:
  print(8)
elif X>=600 and X<=799:
  print(7)
elif X>=800 and X<=999:
  print(6)
elif X>=1000 and X<=1199:
  print(5)
elif X>=1200 and X<=1399:
  print(4)
elif X>=1400 and X<=1599:
  print(3)
elif X>=1600 and X<=1799:
  print(2)
elif X>=1800 and X<=1999:
  print(1)
else:
  print()

Fixed code:
X = int(input())
if 400 <= X and X <= 599:
    print(8)
elif 600<=X and X<=799:
    print(7)
elif 800<=X and X<=999:
    print(6)
elif 1000<=X and X<=1199:
    print(5)
elif 1200<=X and X<=1399:
    print(4)
elif 1400<=X and X<=1599:
    print(3)
elif 1600<=X and X<=1799:
    print(2)
elif 1800<=X and X<=1999:
    print(1)
Buggy code:
n=int(input())
if n>400 and n<=599:
	print("8")
elif n>600 and n<=799:
	print("7")
elif n>800 and n<=999:
	print("6")
elif n>1000 and n<=1199:
	print("5')
elif n>1200 and n<=1399:
	print("4")
elif n>1400 and n<=1599:
    print("3")
elif n>1600 and n<=1799:
    print("2")
elif n>1800 and n<=1999:
	print("1")

Fixed code:
n=int(input())
if n>=400 and n<=599:
  print("8")
elif n>=600 and n<=799:
  print("7")
elif n>=800 and n<=999:
  print("6")
elif n>=1000 and n<=1199:
  print("5")
elif n>=1200 and n<=1399:
  print("4")
elif n>=1400 and n<=1599:
  print("3")
elif n>=1600 and n<=1799:
  print("2")
elif n>=1800 and n<=1999:
  print("1")
Buggy code:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys
#####################################
x=int(input())
if x>=400 and x<=599:
    print(8)
elif x>=600 and x<=799:
    print(7)
elif x>=800 and x<=799:
    print(6)
elif x>=1000 and x<=799:
    print(5)
elif x>=1200 and x<=799:
    print(4)
elif x>=1400 and x<=799:
    print(3)
elif x>=1600 and x<=799:
    print(2)
elif x>=1800 and x<=1999:
    print(1)


Fixed code:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys
#####################################
x=int(input())
if x>=400 and x<=599:
    print(8)
elif x>=600 and x<=799:
    print(7)
elif x>=800 and x<=999:
    print(6)
elif x>=1000 and x<=1199:
    print(5)
elif x>=1200 and x<=1399:
    print(4)
elif x>=1400 and x<=1599:
    print(3)
elif x>=1600 and x<=1799:
    print(2)
elif x>=1800 and x<=1999:
    print(1)
Buggy code:
n = input()
print(10 - n // 200)

Fixed code:
n = int(input())
print(10 - n // 200)
Buggy code:
x = int(input())

if 400 <= x and x <= 599:
    return 8
elif 600 <= x and x <= 799:
    return 7
elif 800 <= x and x <= 999:
    return 6
elif 1000 <= x and x <= 1199:
    return 5
elif 1200 <= x and x <= 1399:
    return 4
elif 1400 <= x and x <= 1599:
    return 3
elif 1600 <= x and x <= 1799:
    return 2
else:
    return 1

Fixed code:
x = int(input())

if 400 <= x and x <= 599:
    print(8)
elif 600 <= x and x <= 799:
    print(7)
elif 800 <= x and x <= 999:
    print(6)
elif 1000 <= x and x <= 1199:
    print(5)
elif 1200 <= x and x <= 1399:
    print(4)
elif 1400 <= x and x <= 1599:
    print(3)
elif 1600 <= x and x <= 1799:
    print(2)
else:
    print(1)
Buggy code:
n = int(input())

a = 8 - ( (n -400) // 200)

print a

Fixed code:
n = int(input())
 
a = 8 - ( (n -400) // 200)
 
print (a)
Buggy code:
x = int(input())
if (x < 400) or (2000 <= x):
  break
elif(400 <= x < 600):
  print(8)
elif(600 <= x < 800):
  print(7)
elif(800 <= x < 1000):
  print(6)
elif(1000 <= x < 1200):
  print(5)
elif(1200 <= x < 1400):
  print(4)
elif(1400 <= x < 1600):
  print(3)
elif(1600 <= x < 1800):
  print(2)
elif(1800 <= x < 2000):
  print(1)

Fixed code:
x=int(input())
if 400<=x<600:
    print(8)
elif 600<=x<800:
    print(7)
elif 800<=x<1000:
    print(6)
elif 1000<=x<1200:
    print(5)
elif 1200<=x<1400:
    print(4)
elif 1400<=x<1600:
    print(3)
elif 1600<=x<1800:
    print(2)
elif 1800<=x<2000:
    print(1)
Buggy code:
x = int(input())
	for i in range(2,10):
	    if i <= x/200 < i+1:
    	    print(10-i)

Fixed code:
x = int(input())
for i in range(2,10):
    if i <= x/200 < i+1:
        print(10-i)
Buggy code:
X=int(input())
if X>=1800:
  print(1)
elif X>=1600:
  print(2)
elif X>=1400:
  print(3) 
elif X>=1200:
  print(4)
elif X>=1000:
  print(5)
elif X>=800:
  print(6)
elif X>=600:
  print(7)
else:
  print(8)

elif X>=1600:
  print(2)  
  

Fixed code:
X=int(input())
if X>=1800:
  print(1)
elif X>=1600:
  print(2)
elif X>=1400:
  print(3) 
elif X>=1200:
  print(4)
elif X>=1000:
  print(5)
elif X>=800:
  print(6)
elif X>=600:
  print(7)
else:
  print(8)
Buggy code:
x=int(input())
if(x<=400 and x>=599):
  print("8")
elif(x<=600 and x>=799):
  print("7")
elif(x<=800 and x>=999):
  print("6")
elif(x<=1000 and x>=1199):
  print("5")
elif(x<=1200 and x>=1399):
  print("4")
elif(x<=1400 and x>=1599):
  print("3")
elif(x<=1600 and x>=1799):
  print("2")
elif(x<=1800 and x>=1999):
  print("1")
	

Fixed code:
x=int(input())
if(x>=400 and x<=599):
  print("8")
elif(x>=600 and x<=799):
  print("7")
elif(x>=800 and x<=999):
  print("6")
elif(x>=1000 and x<=1199):
  print("5")
elif(x>=1200 and x<=1399):
  print("4")
elif(x>=1400 and x<=1599):
  print("3")
elif(x>=1600 and x<=1799):
  print("2")
elif(x>=1800 and x<=1999):
  print("1")
Buggy code:
s = int(input()) 

if 400 < s < 500:
  print("8")
elif  600 < s <799:
        print("7")
elif  800 < s <999:
        print("6")
elif  1000 < s <1199:
        print("5")
elif  1200 < s <1399:
        print("4")
elif  1400 < s <1599:
        print("3")
elif  1600 < s <1799:
        print("2")
elif  1800 < s <1999:
        print("1")
    
    
    
    

Fixed code:
s = int(input()) 
 
if 400 <= s <= 599:
  print("8")
elif  600 <= s <=799:
        print("7")
elif  800 <= s <=999:
        print("6")
elif  1000 <= s <=1199:
        print("5")
elif  1200 <= s <=1399:
        print("4")
elif  1400 <= s <=1599:
        print("3")
elif  1600 <= s <=1799:
        print("2")
elif  1800 <= s <=1999:
        print("1")
Buggy code:
MI = lambda :(map(int,input().split()))
x = II()
if x>1799:
	print(1)
elif x>1599:
	print(2)
elif x>1399:
	print(3)
elif x>1199:
	print(4)
elif x>999:
	print(5)
elif x>799:
	print(6)
elif x>599:
	print(7)
else:
	print(8)

Fixed code:
MI = lambda :(map(int,input().split()))
x = int(input())
if x>1799:
	print(1)
elif x>1599:
	print(2)
elif x>1399:
	print(3)
elif x>1199:
	print(4)
elif x>999:
	print(5)
elif x>799:
	print(6)
elif x>599:
	print(7)
else:
	print(8)
Buggy code:
	a=int(input())

    if a >= 400 and a < 600:
        print("8")
    elif a >= 600 and a < 800:
        print("7")
    elif a >= 800 and a < 1000:
        print("6")
    elif a >= 1000 and a < 1200:
        print("5")
    elif a >= 1200 and a < 1400:
        print("4")
    elif a >= 1400 and a < 1600:
        print("3")
    elif a >= 1600 and a < 1800:
        print("2")
    elif a >= 1800 and a < 2000:
        print("8")

Fixed code:
a=int(input())

if a >= 400 and a < 600:
    print("8")
elif a >= 600 and a < 800:
    print("7")
elif a >= 800 and a < 1000:
    print("6")
elif a >= 1000 and a < 1200:
    print("5")
elif a >= 1200 and a < 1400:
    print("4")
elif a >= 1400 and a < 1600:
    print("3")
elif a >= 1600 and a < 1800:
    print("2")
elif a >= 1800 and a < 2000:
    print("1")
Buggy code:
## for use in beginner level questions where speed is key
## and also for single test case code
## mastercopy for x,y,z

import sys
import heapq, functools, collections
import random
from collections import Counter, defaultdict

# read line as a string
# strr = input()

# read line as an integer
k = int(input())

# read one line and parse each word as a string
# lst = input().split()

# read one line and parse each word as an integer
# arr = list(map(int,input().split()))

print((2200-k)//200)


Fixed code:
## for use in beginner level questions where speed is key
## and also for single test case code
## mastercopy for x,y,z

import sys
import heapq, functools, collections
import random
from collections import Counter, defaultdict

# read line as a string
# strr = input()

# read line as an integer
k = int(input())

# read one line and parse each word as a string
# lst = input().split()

# read one line and parse each word as an integer
# arr = list(map(int,input().split()))

print((2199-k)//200)
Buggy code:
x = input(int())
for i in range(2, 10):
  if 200*i <= x < 200*(i+1)-1:
    pprint(10-i)

Fixed code:
x = int(input())
for i in range(2,10):
  if 200*i <= x < 200*(i+1):
    print(10-i)
Buggy code:
X = input()
a = 2000 / X
if a >= 2000/599:
  print(8)
elif a >= 2000/799:
  print(7)
elif a >= 2000/999:
  print(6)
elif a >= 2000/1199:
  print(5)
elif a >= 2000/1399:
  print(4)
elif a >= 2000/1599:
  print(3)
elif a >= 2000/1799:
  print(2)
elif a >= 2000/1999:
  print(1)

Fixed code:
X = int(input())

a = 1999/X

if a >= 1999/599:
  print(8)
elif a >= 1999/799:
  print(7)
elif a >= 1999/999:
  print(6)
elif a >= 1999/1199:
  print(5)
elif a >= 1999/1399:
  print(4)
elif a >= 1999/1599:
  print(3)
elif a >= 1999/1799:
  print(2)
elif a >= 1999/1999:
  print(1)
Buggy code:
X = int(input())
if X > 400 and X < 599:
    print('8')
elif X > 600 and X < 799:
    print('7')
elif X > 800 and X < 999:
    print('6')
elif X > 1000 and X < 1199:
    print('5')
elif X > 1200 and X < 1399:
    print('4')
elif X > 1400 and X < 1599:
    print('3')
elif X > 1600 and X < 1799:
    print('2')
elif X > 1800 and X < 799:
    print('1')

Fixed code:
X = int(input())
if X >= 400 and X <= 599:
    print('8')
elif X >= 600 and X <= 799:
    print('7')
elif X >= 800 and X <= 999:
    print('6')
elif X >= 1000 and X <= 1199:
    print('5')
elif X >= 1200 and X <= 1399:
    print('4')
elif X >= 1400 and X <= 1599:
    print('3')
elif X >= 1600 and X <= 1799:
    print('2')
elif X >= 1800 and X <= 1999:
    print('1')
Buggy code:
X = int(input())
print 10 - X//200

Fixed code:
X=int(input())
print(10-(X//200))
Buggy code:
X=int(input())

if x<400:
    print(8)
elif 400<=X<=599:
    print(8)
elif 600<=X<=799:
    print(7)
elif 800<=X<=999:
    prnit(6)
elif 1000<=X<=1199:
    print(5)
elif 1200<=X<=1399:
    print(4)
elif 1400<=X<=1599:
    print(3)
elif 1600<=X<=1799:
    print(2)
elif 1800<=X<=1999:
    print(1)
else:
    print(1)

Fixed code:
x = int(input())
 
if 400 <= x <= 599:
    print(8)
elif 600 <= x <= 799:
    print(7)
elif 800 <= x <= 999:
    print(6)
elif 1000 <= x <= 1199:
    print(5)
elif 1200 <= x <= 1399:
    print(4)
elif 1400 <= x <= 1599:
    print(3)
elif 1600 <= x <= 1799:
    print(2)
elif 1800 <= x <= 1999:
    print(1)
Buggy code:
import sys
readline = sys.stdin.readline

def solve():
    X = int(readline())

    print(10 - X // 200)


Fixed code:
import sys
readline = sys.stdin.readline

def solve():
    X = int(readline())

    print(10 - X // 200)

solve()
Buggy code:
a = input()

if a>=400 and a<600:print(8)
elif a>=600 and a<800:print(7)
elif a>=800 and a<1000:print(6)
elif a>=1000 and a<1200:print(5)
elif a>=1200 and a<1400:print(4)
elif a>=1400 and a<1600:print(3)
elif a>=1600 and a<1800:print(2)
elif a>=1800 and a<2000:print(1)

Fixed code:
a = int(input())
 
if a>=400 and a<600:print(8)
elif a>=600 and a<800:print(7)
elif a>=800 and a<1000:print(6)
elif a>=1000 and a<1200:print(5)
elif a>=1200 and a<1400:print(4)
elif a>=1400 and a<1600:print(3)
elif a>=1600 and a<1800:print(2)
elif a>=1800 and a<2000:print(1)
Buggy code:
r, g, b = [int(x) for x in input().split()]
ops = int(input())

m = 0
while m <= ops:
    if max(r, g, b ) != b:
        b *= 2
        m += 1
    else:break
while m < ops:
    if max(r, g) != g :
        g *= 2
        m += 1
    else:
        break
print(r,g,b)
print("Yes" if r < g < b else "No")





Fixed code:
r, g, b = [int(x) for x in input().split()]
ops = int(input())
m = 0
while g <= r:
        g *= 2
        m += 1
while b <= g:
        b *= 2
        m += 1
print("Yes" if m <= ops  else "No")
Buggy code:
a, b, c = map(int, input().split())
k = int(input())

ans = 0
for x in range(1,k+1):
    for y in range(1,k+1):
        for z in range(1,k+1):
            if b**2*y > a**2*x and c**2*z > b**2*y:
                ans += 1

if ans >= 1:
    print("Yes")
else:
    print("No")
    

Fixed code:
a, b, c = map(int, input().split())
k = int(input())

ans = 0
for x in range(k+1):
    for y in range(k+1-x):
        for z in range(k+1-x-y):
            if b*2**y > a*2**x and c*2**z > b*2**y:
                ans += 1
#print(ans)

if ans == 0:
    print("No")
else:
    print("Yes")
Buggy code:
A,B,C = map(int,input().split())
K = int(input())
cnt = 0
for _ in range(K):
	if A>=B:
		B *= 2
		cnt += 1
	else:
		break

for _ in range(K-cnt):
	if B>=C:
		C *= 2
	else:
		break
print(cnt)

if (A<B) and (B<C):
	print('Yes')
else:
	print('No')

Fixed code:
A,B,C = map(int,input().split())
K = int(input())
cnt = 0
for _ in range(K):
	if A>=B:
		B *= 2
		cnt += 1
	else:
		break

for _ in range(K-cnt):
	if B>=C:
		C *= 2
	else:
		break
#print(cnt)

if (A<B) and (B<C):
	print('Yes')
else:
	print('No')
Buggy code:
A,B,C = map(int,input().split())
K = int(input())

for i in range(K):
    tmp = min(B,C)
    if(B==C):
        C *= 2
    elif(B==tmp):
        B *= 2
    else:
        C *= 2
    print(A,B,C)
if A< B and B<C:
    print('Yes')
else:
    print('No')

Fixed code:
A,B,C = map(int,input().split())
K = int(input())

for i in range(K):
    tmp = min(B,C)
    if(B==C):
        C *= 2
    elif(2*B >= C):
        C *= 2
    else:
        B *=2
    # print(A,B,C)
if A< B and B<C:
    print('Yes')
else:
    print('No')
Buggy code:
A,B,C=[int(s) for s in input().split()]
X=int(input())
count=0
while A<=B:
  B*=2
  count+=1
while B<=C:
  C*=2
  count+=1
if count<=X:
  print('Yes')
else:
  print('No')

Fixed code:
A,B,C=[int(s) for s in input().split()]
X=int(input())
count=0
while A>=B:
  B*=2
  count+=1
while B>=C:
  C*=2
  count+=1
if count<=X:
  print('Yes')
else:
  print('No')
Buggy code:
def countup(a, b):
    count = 0
    if a < b:
        return count
    else:
        while a > b:
            b *= 2
            count += 1
        return count


A, B, C = map(int, input().split())
K = int(input())

count = countup(A, B)
B_ = B * (2 ** count)
count += countup(B_, C)


if count <= K:
    print('Yes')
else:
    print('No')


Fixed code:
def countup(a, b):
    count = 0
    if a < b:
        return count
    else:
        while a >= b:
            b *= 2
            count += 1
        return count


A, B, C = map(int, input().split())
K = int(input())

count = countup(A, B)
B_ = B * (2 ** count)
count += countup(B_, C)

if count <= K:
    print('Yes')
else:
    print('No')
Buggy code:
a,b,c=map(int,input().split())
k=int(input())
for i in range(k):
    if a>b:
        b=b*2
        print(a,b,c)
        if b>c:
            c=c*2
            print(a,b,c)


if a<b and b<c:
    print('Yes')
else:
    print('No')

Fixed code:
a,b,c= map(int, input().split())
k=int(input())
for i in range(k):
    if a>=b:
        b*=2
    elif b>=c:
        c*=2

if a<b and b<c:
    print('Yes')
else:
    print('No')
Buggy code:
A, B, C = map(int, input().split())
K = int(input())

cnt = 0
while B <= A:
    cnt += 1
    B *= 2
while C <= B:
    cnt += 1
    C *= 2
print(cnt)
if cnt <= K:
    print("Yes")
else:
    print("No")

Fixed code:
A, B, C = map(int, input().split())
K = int(input())
n = 0
while B <= A:
    B *= 2
    n += 1
while C <= B:
    C *= 2
    n += 1
print('Yes' if n <= K else 'No')
Buggy code:
A,B,C = map(int, input().split())
K = int(input())
D = B
E = C
i1 = 1
i2 = 1
while(D<A):
    D = D*2
    i1 +=1
while(E<A):
    E = E*2
    i2 +=1
if K >= i1+i2-2:
    print("Yes")
else:
    print("No") 

Fixed code:
A,B,C = map(int, input().split())
K = int(input())
D = B
E = C
i1 = 0
i2 = 0
while(D<=A):
    D = D*2
    i1 +=1
while(E<=D):
    E = E*2
    i2 +=1
if K >= i1+i2:
    print("Yes")
else:
    print("No")
Buggy code:
a,b,c = map(int, input().split())
k = int(input())

count = 0
while count < k:
  if a<b and b<c:
    print('Yes')
    exit()
  elif a >= b:
    b *= 2
    count += 1
  elif b >= c:
    c *= 2
    count += 1
  print(count)

if a<b and b<c:
  print('Yes')
else:
  print('No')

Fixed code:
a,b,c = map(int, input().split())
k = int(input())

count = 0
while count < k:
  if a<b and b<c:
    print('Yes')
    exit()
  elif a >= b:
    b *= 2
    count += 1
  elif b >= c:
    c *= 2
    count += 1

if a<b and b<c:
  print('Yes')
else:
  print('No')
Buggy code:
import sys


def handler():
    a, b, c = [int(i) for i in input().strip().split()]
    bar = int(input().strip())
    foo = 0
    while b <= a:
        b *= 2
        foo += 1
    while c <= b:
        c *= 2
        foo += 1
    if foo <= bar:
        sys.stdout.write('YES\n')
    else:
        sys.stdout.write('NO\n')


def main():
    while True:
        try:
            handler()
        except ValueError:
            continue
        except EOFError:
            break


if __name__ == '__main__':
    main()

Fixed code:
import sys


def handler():
    a, b, c = [int(i) for i in input().strip().split()]
    bar = int(input().strip())
    foo = 0
    while b <= a:
        b *= 2
        foo += 1
    while c <= b:
        c *= 2
        foo += 1
    if foo <= bar:
        sys.stdout.write('Yes\n')
    else:
        sys.stdout.write('No\n')


def main():
    while True:
        try:
            handler()
        except ValueError:
            continue
        except EOFError:
            break


if __name__ == '__main__':
    main()
Buggy code:
a, b, c = map(int, input().split())
k = int(input())

cnt = 0

while a >= b:
  b *= 2
  cnt += 1

  while b >= c:
    c *= 2
    cnt += 1

    if cnt <= k:
      print("Yes")
      else:
        print("No")

Fixed code:
a, b, c = map(int ,input().split())
k = int(input())

count = 0
while(a>=b):
  b*=2
  count += 1
while(b>=c):
  c*=2
  count+=1

if(count <= k):
  print("Yes")
else:
  print("No")
Buggy code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def main():
    A, B, C = map(int, input().split())
    K = int(input())
    print(A, B, C, K)

    for _ in range(K):
        if A > B:
            B *= 2
        elif B > C:
            C *= 2
    if A < B < C:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()


Fixed code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def main():
    A, B, C = map(int, input().split())
    K = int(input())

    for _ in range(K):
        if not A < B:
            B *= 2
        elif not B < C:
            C *= 2
    if A < B < C:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
Buggy code:
A,B,C = map(int,input().split())
K = int(input())

n = 0
while B <= A:
  B * 2
  i += 1
  
while C <= B:
  C * 2
  i += 1

print('Yes' if i <= K else 'No)

Fixed code:
A,B,C = map(int,input().split())
K = int(input())

i = 0
while B <= A:
  B *= 2
  i += 1
  
while C <= B:
  C *= 2
  i += 1

print('Yes' if i <= K else 'No')
Buggy code:
a=list(map,input().split())
k=int(input())
while a[0]>=a[1]:
  k--
  a[1]*=2
while a[1]>=a[2]:
  k--
  a[2]*=2
if k>=0:
  print("Yes")
else:
  print("No")

Fixed code:
a=list(map(int,input().split()))
k=int(input())
while a[0]>=a[1]:
  k-=1
  a[1]*=2
while a[1]>=a[2]:
  k-=1
  a[2]*=2
if k>=0:
  print("Yes")
else:
  print("No")
Buggy code:
[A,B,C] = map(int,input().split())
K = int(input())

ans = 'No'
for i in range(K+1):
    for j in range(K+1-i):
        for h in range(K+1-i-j) :
            if i == 0 and j == 0 and h == 0:
                z = 1
            else :
                if i > 0 :
                    R = A*2*i
                else:
                    R = A
                if j > 0 :
                    G = B*2*j
                else :
                    G = B
                if h > 0 :           
                    Bl = C*2*h
                else:
                    Bl = C
                if G > R and Bl > G:
                    ans = 'Yes'
                    break

Fixed code:
[A,B,C] = map(int,input().split())
K = int(input())

ans = 'No'
i = 0
for i in range(K+1):
    for j in range(K+1-i):
        h = K-i-j 
        if i > 0 :
            R = A*(2**i)
        else:
            R = A
        if j > 0 :
            G = B*(2**j)
        else :
            G = B
        if h > 0 :           
            Bl = C*(2**h)
        else:
            Bl = C
        if G > R and Bl > G:
            ans = 'Yes'


print(ans)