qyliang/CodeNanoFix huggingface dataset:
Buggy code:
s = input()
length = len(s)

maxlen = 0
for i in range(length//2-1):
  if s[0:(i+1)] == s[(i+1):2*(i+1)]:
    maxlen = 2*i
    
print(maxlen)   
    
  

Fixed code:
s = input()
length = len(s)

maxlen = 0
for i in range(length//2-1):
  if s[0:(i+1)] == s[(i+1):2*(i+1)]:
    maxlen = 2*(i+1)
    
print(maxlen)
Buggy code:
s = input()
alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m"\
        , "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]

ans = 0
i = 1
while i * 2 < len(s):
  if s[:i] == s[i:2 * i]: ans = i
print(ans)


Fixed code:
s = input()
alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m"\
        , "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]

ans = 0
i = 1
while i * 2 < len(s):
  if s[:i] == s[i:2 * i]: ans = i * 2
  i += 1
print(ans)
Buggy code:
s=list(input())
while(1):
    if len(s)==1:
        print(s)
        break
    s.pop(-1)
    if s[:t]==s[t:]:
        print(len(s))
        break
    t=int(len(s)/2)

Fixed code:
s=list(input())
while(1):
    t=int(len(s)/2)
    if len(s)==1:
        print(s)
        break
    s.pop(-1)
    if s[:t]==s[t:]:
        print(len(s))
        break
Buggy code:
s=input()
for i in range(len(s)):
    s=s[:-1]
    if len(s)%2 ==0 and s[:len(s)//2] == s[len(s)//2:]:
        print(s)
        break


Fixed code:
s=input()
for i in range(len(s)):
    s=s[:-1]
    if len(s)%2 ==0 and s[:len(s)//2] == s[len(s)//2:]:
        print(len(s))
        break
Buggy code:
#B ss
a = input()
l = len(a) -1
if l%2!=0 :
    l -=1

for i in range(l//2):
    l -=2*i
    if a[0:l//2] == a[l//2:l]:
        print(l)
        break
    

Fixed code:
#B ss
a = input()
l = len(a) -1
k=0
if l%2!=0 :
    l -=1

for i in range(l//2):
    if a[0:l//2] == a[l//2:l]:
        k = l
        break
    l -=2
print(k)
Buggy code:
def judge(S):
    half = int(len(S)/2)
    if S[:half] == S[half:]:
        return True
    else:
        return False

S= input()
l = len(S)
if l%2 == 1:
    S = S[:-1]
else:
    S = S[:-2]
print(S)
while S != "":
    if judge(S):
        break
    S = S[:-2]

print(len(S))

Fixed code:
def judge(S):
    half = int(len(S)/2)
    if S[:half] == S[half:]:
        return True
    else:
        return False

S= input()
l = len(S)
if l%2 == 1:
    S = S[:-1]
else:
    S = S[:-2]
while S != "":
    if judge(S):
        break
    S = S[:-2]

print(len(S))
Buggy code:
a=input()
if len(a)%2==1:a=a[:-1]
while a[0:int(len(a)/2)]!=a[int((len(a)/2)):len(a)]:
  a=a[:-2]
print(len(a))

Fixed code:
a=input()
if len(a)%2==1:a=a[:-1]
else:a=a[:-2]
while a[0:int(len(a)/2)]!=a[int((len(a)/2)):len(a)]:
  a=a[:-2]
print(len(a))
Buggy code:
S = input()
ans = 0
for i in range(1, len(S)):
  s = S[: -2*i]
  l = (len(S) - 2*i) // 2
  if s[:l] == s[l:]:
    ans = 2*i
    break
print(ans)

Fixed code:
S = input()
ans = 0
for i in range(1, len(S)):
  s = S[: -2*i]
  l = (len(S) - 2*i) // 2
  if s[:l] == s[l:]:
    ans = len(S) - 2*i
    break
print(ans)
Buggy code:
s=input()
s=s[:len(s)-1]
flag=True

while(flag):
    if len(s)%2==0:
        left=s[:len(s)//2] 
        right=s[len(s)//2:]
        print(left,right)
        if left==right:
            print(len(s))
            flag=False
        else:
            s=s[0:len(s)-1]
    else:
        s=s[0:len(s)-1]
        print(s)
    
    

Fixed code:
s=input()
s=s[:len(s)-1]
flag=True

while(flag):
    if len(s)%2==0:
        left=s[:len(s)//2] 
        right=s[len(s)//2:]
        if left==right:
            print(len(s))
            flag=False
        else:
            s=s[0:len(s)-1]
    else:
        s=s[0:len(s)-1]
Buggy code:
s = input()
l = len(s)
ans = 0
search = l-1

if search <= 2:
    print(0)
    exit()

while search > 2:
    if search % 2 == 0:
        if s[0:search//2] == s[search//2:search]:
            ans = max(ans, search)
    else:
        pass
    search -= 1
print(ans)

Fixed code:
s = input()
l = len(s)
ans = 0
search = l-1

if search < 2:
    print(0)
    exit()

while search >= 2:
    if search % 2 == 0:
        if s[0:search//2] == s[search//2:search]:
            ans = max(ans, search)
    else:
        pass
    search -= 1
print(ans)
Buggy code:
S = list(input())
N = len(S)
for i in range(2,N+1,2):
  S = S[:-2]
  if S[:len(S)//2] == S[len(S)//2:]:
    print(len(S))

Fixed code:
S = list(input())
N = len(S)
for i in range(2,N+1,2):
  S = S[:-2]
  if S[:len(S)//2] == S[len(S)//2:]:
    print(len(S))
    break
Buggy code:
S = input()
for i in range(len(S)):
    S = S[:-1]
    if len(S) % 2 == 1:
        continue
    else:
        if S[:len(S)//2] == S[len(S)//2:len(S)]:
            print(len(S))
        else:
            continue

Fixed code:
S = input()
for i in range(len(S)):
    S = S[:-1]
    if len(S) % 2 == 1:
        continue
    else:
        if S[:len(S)//2] == S[len(S)//2:len(S)]:
            print(len(S))
            exit()
        else:
            continue
Buggy code:
#!/usr/bin
# -*- coding:"utf-8" -*-

s = input()
sn = len(s)

if sn % 2 == 1:
  sn = sn -1
for i in range(sn, 0, -2)
  if s[:i/2] == s[i/2:]:
    break
print(s[:i])


Fixed code:
#!/usr/bin
# -*- coding="utf-8" -*-
 
s = input()[:-1]
sn = len(s)

if sn % 2 == 1:
  sn = sn -1
for i in range(sn, 0, -2):
  if s[:i//2] == s[i//2:i]:
    break
print(len(s[:i]))
Buggy code:
c=0
i=0
list1=[]
list2=[]


S = input('')
char_list = list(S)
c = len (char_list)
c= c-1
print(c)

while c>1:
	if c % 2 == 0:
		d=int(c/2)
		print (d)
		for i in range(d):
			list1.append(char_list[i]) 
			list2.append(char_list[i+d])
		print (list1)
		print(list2)

		if list1 == list2:
			print (len (list1))
			break

		list1=[]
		list2=[]
	c=c-1

Fixed code:
c=0
i=0
list1=[]
list2=[]


S = input('')
char_list = list(S)
c = len (char_list)
c= c-1
#print(c)

while c>1:
	if c % 2 == 0:
		d=int(c/2)
		#print (d)
		for i in range(d):
			list1.append(char_list[i]) 
			list2.append(char_list[i+d])
		#print (list1)
		#print(list2)

		if list1 == list2:
			print (len (list1)*2)
			break

		list1=[]
		list2=[]
	c=c-1
Buggy code:
s = input()
while s[0:len(s)//2] != s[len(s)//2:]:
  s = s[:-1]
print(len(s))

Fixed code:
s = input()[:-1]
while s[0:len(s)//2] != s[len(s)//2:]:
  s = s[:-1]
print(len(s))
Buggy code:
S = input()

LengthS = len(S)
for i in range(3):
    LengthS = LengthS - 2
    HalfS = int(LengthS / 2)
    if S[:HalfS] == S[HalfS:LengthS]:
        print(LengthS)
        break


Fixed code:
S = input()

LengthS = len(S)
for i in range(100):
    LengthS = LengthS - 2
    HalfS = int(LengthS / 2)
    if S[:HalfS] == S[HalfS:LengthS]:
        print(LengthS)
        break
Buggy code:
S = input().sprit()
n = len(S)

for i in range(n-2, 0, -2):
  S = S[:i]
  k = i // 2
  if S[k:] == S[:k]:
    print(i)
    exit()

Fixed code:
S = input().strip()
n = len(S)

for i in range(n-2, 0, -2):
  S = S[:i]
  k = i // 2
  if S[k:] == S[:k]:
    print(i)
    exit()
Buggy code:
s = input()
n = len(s)
while True:
  s = s[:-2]
  n -= 2
  if s[:n//2] == s[n//2:]:
    print(n)

Fixed code:
s = input()
n = len(s)
while True:
  s = s[:-2]
  n -= 2
  if s[:n//2] == s[n//2:]:
    print(n)
    break
Buggy code:
S = input()

def judge_s(s):
    if len(s)%2==1:
        return False
    mid = len(s)//2
    if s[:mid]==s[mid:]:
        return True

for i in range(1, len(S)-1):
    if judge_s(S[:-i]):
        ans = S[:-i]
        break
else:
    print(len(ans))

Fixed code:
S = input()

def judge_s(s):
    if len(s)%2==1:
        return False
    mid = len(s)//2
    if s[:mid]==s[mid:]:
        return True

for i in range(1, len(S)-1):
    if judge_s(S[:-i]):
        ans = S[:-i]
        break

print(len(ans))
Buggy code:
s = input()
n = len(s)
s = s[:-2]
for _ in range(n):
  n = len(s)
  m = int(n/2)
  if s[:m] == s[m:]:
    print(s)
    break
  else:
    s = s[:-2]

Fixed code:
s = input()
n = len(s)
s = s[:-2]
for _ in range(n):
  n = len(s)
  m = int(n/2)
  if s[:m] == s[m:]:
    print(len(s))
    break
  else:
    s = s[:-2]
Buggy code:
s=input()
ans = 0
for i in range(len(s)//2):
  if s[:i]==s[i:i*2]:
    ans=i+1
print(ans)

Fixed code:
s=input()
ans = 0
for i in range(len(s)//2):
  if s[:i]==s[i:i*2]:
    ans=i*2
print(ans)
Buggy code:
S = list(input())
for i in range(len(S)):
    if len(S)%2 != 0:
        S.pop()
    else:
        if S[:len(S)//2] == S[len(S)//2:]:
            res = len(S)
            break
        else:
            S.pop()
            S.pop()
print(res)

Fixed code:
S = list(input())

if len(S)%2 != 0:
    S.pop()
else:
    S.pop()
    S.pop()
    
for i in range(len(S)):
    if S[:len(S)//2] == S[len(S)//2:]:
        res = len(S)
        break
    else:
        S.pop()
        S.pop()
print(res)
Buggy code:
s=input()
maxlen=0
for i in range(8):
  ss=s[:-i]
  if ss[:len(ss)//2]==ss[len(ss)//2:]:
    maxlen=(max(len(ss),maxlen))
print(maxlen)

Fixed code:
s=input()
maxlen=0
for i in range(len(s)):
  ss=s[:-i]
  if ss[:len(ss)//2]==ss[len(ss)//2:]:
    maxlen=(max(len(ss),maxlen))
print(maxlen)
Buggy code:
S = list(str(input()))

def ss(string):
    if len(string)&2==1:
        retrun(False)
    else:
        for i in range(len(string)//2):
            if S[i]!=S[len(string)-1-i]:
                return(False)
        return(True)

while True:
    if ss(S):
        print(len(S))
        exit()
    else:
        del S[-1]
        del S[-1]


Fixed code:
S = list(str(input()))
del S[-1]
del S[-1]

def ss(string):
    if len(string)&2==1:
        retrun(False)
    else:
        for i in range(len(string)//2):
            if S[i]!=S[len(string)//2+i]:
                return(False)
        return(True)

while True:
    if ss(S):
        print(len(S))
        exit()
    else:
        del S[-1]
        del S[-1]
Buggy code:
S = input()
l = len(S)
for i in range(1,l-2):
  s = S[0:l-i]
  ls = len(s)
  if ls%2 == 0 and s[0:int(ls/2)] == s[int(ls/2):ls]:
    break
print(ls)

Fixed code:
S = input()
l = len(S)
for i in range(1,l-1):
  s = S[0:l-i]
  ls = len(s)
  if ls%2 == 0 and s[0:int(ls/2)] == s[int(ls/2):ls]:
    break
print(ls)
Buggy code:
s = str(input())
for i in range(len(s)):
    s = s[:-1]
    print(s)
    if len(s) % 2 == 0:
        flag = 0
        for j in range(int(len(s)/2)):
            if s[j] == s[j+int((len(s)/2))]:
                flag += 1
        if flag == (int(len(s)/2)):
            print(len(s))
            break

Fixed code:
s = str(input())
for i in range(len(s)):
    s = s[:-1]
    if len(s) % 2 == 0:
        flag = 0
        for j in range(int(len(s)/2)):
            if s[j] == s[j+int((len(s)/2))]:
                flag += 1
        if flag == (int(len(s)/2)):
            print(len(s))
            break
Buggy code:
S = str(input())
N = len(S)

def f():
    for erase in range(2, N + 1, 2):
        new = S[0 : N - erase]
        flg = 1
        for i in range((N - erase) // 2):
            if new[i] != new[(N - erase) // 2 + i]: flg = 0
            break
        if not flg: continue
        return len(new)

print(f())

Fixed code:
S = str(input())
N = len(S)

def f():
    for erase in range(1, N + 1):
        new = S[0 : N - erase]
        if len(new) % 2 == 1: continue
        flg = 1
        for i in range((N - erase) // 2):
            if new[i] != new[(N - erase) // 2 + i]: 
                flg = 0
                break
        if not flg: continue
        return len(new)

print(f())
Buggy code:
S = input()
result = ''
for i in range(1, len(S)):
    s = S[0:len(S) - i]
	if len(s) % 2 == 0 and s[0:len(s)//2] == s[len(s)//2:]:
        result = len(s)
        break

print(result)


Fixed code:
S = input()
result = ''
for i in range(1, len(S)):
    s = S[0:len(S) - i]
    if len(s) % 2 == 0 and s[0:len(s)//2] == s[len(s)//2:]:
        result = len(s)
        break
print(result)
Buggy code:
# encoding:utf-8
S = input()

for i in range(2 , len(S), 2):
	mid_p = int((len(S) - i)/2)
	if S[0:mid_p] == S[mid_p:(len(S) - i)]:
		print(S[0:(len(S) - i)])
		break


Fixed code:
# encoding:utf-8
S = input()

for i in range(2 , len(S), 2):
	mid_p = int((len(S) - i)/2)
	if S[0:mid_p] == S[mid_p:(len(S) - i)]:
		print(int(len(S) - i))
		break
Buggy code:
A= list(input())
while True:
    A.pop()
    A.pop()
    B=len(A)//2
    if A[:B+1]==A[B+1:]:
        print(len(A))
        break


Fixed code:
A= list(input())
while True:
    A.pop()
    A.pop()
    B=len(A)//2
    if A[:B]==A[B:]:
        print(len(A))
        break
Buggy code:
S = list(input())
n = len(S)

for i in range(n,1,-1):
    if i%2==0:
        if S[:i//2] == S[i//2:]:
            print(i//2)
            exit()




Fixed code:
S = list(input())
n = len(S)

for i in range(n-1,1,-1):
    if i%2==0:
        if S[:i//2] == S[i//2:i]:
            print(i)
            exit()
Buggy code:
S = input()
S = S[:-2 if len(S) % 2 == 0 else -1]

for i in range(0,len(S)//2)[::-1]:
    if S[:i] == S[i:i*2]:
        print(i*2)
        break


Fixed code:
S = input()
S = S[:-2 if len(S) % 2 == 0 else -1]
for i in range(0,len(S)//2+1)[::-1]:
    if S[:i] == S[i:i*2]:
        print(i*2)
        break
Buggy code:
s=str(input())
s=list(s)
while True:
  del s[len(s)-1]
  if len(s)%2==0:
    count=0
    for i in range(0,int(len(s)/2)):
      if s[i]==s[i+int(len(s)/2)]:
        count=count+1
    if count==int(len(s)/2):
      print(len(s))

Fixed code:
s=str(input())
s=list(s)
while True:
  del s[len(s)-1]
  if len(s)%2==0:
    count=0
    for i in range(0,int(len(s)/2)):
      if s[i]==s[i+int(len(s)/2)]:
        count=count+1
    if count==int(len(s)/2):
      print(len(s))
      break
Buggy code:
s = list(input())
s = s[:-1]

while len(s)%2!=0 or s[:len(s)//2]!=s[len(s)//2:][::-1]:
    s = s[:-1]
print(len(s))

Fixed code:
s = input()
s = s[:-1]

while len(s) % 2 != 0 or s[:len(s)//2] != s[len(s)//2:]:
  s = s[:-1]
print(len(s))
Buggy code:
S = list(input())
length = len(S)
if length == 2:
    ans = 0
elif length == 3:
    length -= 1
    ans = 0
elif length % 2 == 1:
    length -= 1
    ans = 0
else:
    length -= 2
    ans = 0

def hantei(list_str,n):
    k = int(n/2)
    if list_str[0:k] == list_str[k:n]:
        return n
    else:
        return 0

while length != 2:
        ans = hantei(S,length)
        if ans != 0:
            break
        length -= 2

if ans == 0 :
    print(1)
else:
    print(ans)

Fixed code:
def hantei(list_str,n):
    k = int(n/2)
    if list_str[0:k] == list_str[k:n]:
        return n
    else:
        return 0
S = list(input())
length = len(S)
flag = 0
if length == 2:
    print(0)
    flag = 1
elif length == 3:
    length -= 1
    ans = hantei(S,2)
    print(ans)
    flag = 1
elif length % 2 == 1:
    length -= 1
    ans = 0
else:
    length -= 2
    ans = 0
while length >= 2:
        ans = hantei(S,length)
        if ans != 0:
            break
        length -= 2

if flag == 0:
    if ans == 0:
        print(1)
    else:
        print(ans)
Buggy code:
S = [c for c in input()]
while len(S):
    S.pop()
    if len(S) % 2 == 0 and S[:len(S)//2] == S[len(S)//2:]:
        print(len(S[:len(S)//2+1]))
        exit()


Fixed code:
S = [c for c in input()]
while len(S):
    S.pop()
    if len(S) % 2 == 0 and S[:len(S)//2] == S[len(S)//2:]:
        print(len(S))
        exit()
Buggy code:
s = input()
n = len(s)
ret = None
for i in range(n - 1, 0, -1):
    if len(s[:i]) % 2 == 1:
        continue
    # print(s[:i // 2], s[i // 2:i][::-1])
    if s[:i // 2] == s[i // 2:i][::-1]:
        ret = s[:i]
        break
print(len(ret))


Fixed code:
s = input()
n = len(s)
ret = ''
for i in range(n - 1, 0, -1):
    if len(s[:i]) % 2 == 1:
        continue
    # print(s[:i // 2], s[i // 2:i])
    if s[:i // 2] == s[i // 2:i]:
        ret = s[:i]
        break
print(len(ret))
Buggy code:
w=list(input())
for i in range(len(w)):
  del w[-1]
  del w[-1]
  if w[0:len(w)/2]==w[len(w)/2:len(w)]:
    print(len(w))
    break
  
  

Fixed code:
w=list(input())
for i in range(len(w)):
  del w[-1]
  del w[-1]
  if w[0:len(w)//2]==w[len(w)//2:len(w)]:
    print(len(w))
    break
Buggy code:
s=input()
while(1):
  s=s[:-2]
  l=len(s)
  if s[:l/2]==s[l/2:]:
  	print(l)
    break


Fixed code:
s=input()
while 1:
  s=s[:-2]
  l=len(s)
  if s[:l//2]==s[l//2:]:
    print(l)
    break
Buggy code:
s=int(input())
n=len(s)//2
while n!=0:
  
  if s[:n]==s[n:2*n]:
    print(n)
    break
  n=-1

Fixed code:
s=input()
n=len(s)//2
n-=1
while n!=0:
  if s[:n]==s[n:2*n]:
    print(2*n)
    break
  n-=1
Buggy code:
s = input()
n = len(s)
if n%2:
  s = s[:-1]
  n -= 1
for i in range(n//2):
  n = len(s)
  if s[:n//2] == s[n//2:]:
    print(n)
    break
  s = s[:-2]
    
  

Fixed code:
s = input()[:-1]
n = len(s)
if n%2:
  s = s[:-1]
  n -= 1
for i in range(n//2):
  n = len(s)
  if s[:n//2] == s[n//2:]:
    #print(s[:n//2], s[n//2:])
    print(n)
    break
  s = s[:-2]
Buggy code:
x, a, b = map(int, input().split())

if a - b >= 0:
    print('delicious')
elif b - a <= x:
    print('safe')
else:
    print('danger')

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

if a - b >= 0:
    print('delicious')
elif b - a <= x:
    print('safe')
else:
    print('dangerous')
Buggy code:
X,A,B = map(int,input().split())

if A - B > 0:
    print('delicious')
elif A - B > X:
    print('safe')
else:
    print('dangerous')


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

if A - B >= 0:
    print('delicious')
elif B - A <= X:
    print('safe')
else:
    print('dangerous')
Buggy code:
x, a, b = map(int, input().split())

if a < b:
    print('delicious')
elif x >= b - a:
    print('safe')
else:
    print('dangerous')

Fixed code:

x, a, b = map(int, input().split())

if a >= b:
    print("delicious")
elif b - a > x:
    print("dangerous")
else:
    print("safe")
Buggy code:
x,a,b = (int(i) for i in input().split())
if a < b:
  if b-a > x:
    print ('dengerous')
  else:
    print ('safe')
else:
  print ('delicious')


Fixed code:
x,a,b = (int(i) for i in input().split())
if a < b:
  if b-a > x:
    print ('dangerous')
  else:
    print ('safe')
else:
  print ('delicious')
Buggy code:
X,A,B=map(int,input().split())
if B-A<=0:
    print("delicoius")
elif B-A<=X:
    print("safe")
else:
    print('dangerous')

Fixed code:
X,A,B=map(int,input().split())
if B-A<=0:
    print("delicious")
elif B-A<=X:
    print("safe")
else:
    print('dangerous')
Buggy code:
x,a,b=[int(i) for i in input().split()]
if a>=b:
  print('delicious')
elif a+x<=b:
  print('dengerous')
else:
  print('safe')

Fixed code:
x,a,b=[int(i) for i in input().split()]
if a>=b:
  print('delicious')
elif a+x<b:
  print('dangerous')
else:
  print('safe')
Buggy code:
a,b,c = map(int,input().split())
if(c-b>a): print("dangerous")
else if(c-b<=0): print("delicious")
else : print("safe")


Fixed code:
a,b,c = map(int,input().split())
if(c-b>a): 
  print("dangerous")
elif(c-b<=0): 
  print("delicious")
else:
  print("safe")
Buggy code:
x,a,b = map(int,input().split(" "))
temp = a-b

if temp > 0 :
  print("delicious")
  
elif a < abs(temp):
  print("dangerous")
elif a >= abs(temp):
  print("safe")

Fixed code:
x,a,b = map(int,input().split(" "))
temp = a-b
 
if temp >= 0 :
  print("delicious")
  
elif b - a <= x:
  print("safe")
else:
  print("dangerous")
Buggy code:
x, a, b  = map(lambda x: int(x),  input().split())

if b < a:
  print('delicious')
elif x <= b - a:
  print('safe')
else:
  print('dangerous')

Fixed code:
x,a,b = map(int, input().split())
if (b-a)<=0:
  print('delicious')
elif (b-a)<=x:
  print('safe')
else:
  print('dangerous')
Buggy code:
x, a, b = map(int, input().split())
if a <= b :
  print('delicious')
elif a <= b+x:
  print('safe')
else:
  print('dangerous')

Fixed code:
x, a, b = map(int, input().split())
if a >= b :
  print('delicious')
elif a+x >= b:
  print('safe')
else:
  print('dangerous')
Buggy code:
x, a, b  = map(lambda x: int(x),  input().split())

if b <= a:
  print('delicious')
elif b > a and x <= b - a:
  print('safe')
else:
  print('dangerous')


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

if a>=b:
    print("delicious")
elif (b-a)<=x:
    print("safe")
else:
    print("dangerous")
Buggy code:
x, a, b = map(int, input().split())

if a >= b or a+x >= b:
    print("delicious")
elif a+x+1 >= b:
    print("safe")
else:
    print("dangerous")

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

if a >= b:
    print("delicious")
elif a+x >= b:
    print("safe")
else:
    print("dangerous")
Buggy code:
x, a, b = [int(i) for i in input().split()]

if a >= b:
  print("delicious")
elif a + x >= b:
  print("safe")
else:
  print("dengerous")

Fixed code:
x, a, b = [int(i) for i in input().split()]

if a >= b:
  print("delicious")
elif a + x >= b:
  print("safe")
else:
  print("dangerous")
Buggy code:
x,a,b = (int(_) for _ in input().split())

if b <= a:
    print('delicious')
elif a < b <= x:
    print('safe')
elif b > x:
    print('dangerous')

Fixed code:
x,a,b = (int(_) for _ in input().split())

if b <= a:
    print('delicious')
elif a < b <= a+x:
    print('safe')
elif b > a+x:
    print('dangerous')
Buggy code:
X, A, B = map(int, input().split())
eat = A+B

if A >= B:
    print("delicious")
elif eat >= X+1:
    print("dangerous")
else:
    print("safe")

Fixed code:
X, A, B = map(int, input().split())
eat = B-A

if A >= B:
    print("delicious")
elif eat >= X+1:
    print("dangerous")
else:
    print("safe")
Buggy code:
x, a, b = map(int, input().split())

if b-a < 0:
  print("delicious")
elif b-a >= 0 and b-a >= x:
  print("safe")
else:
  print("dangerous")

Fixed code:
x, a, b = map(int, input().split())
if b-a <= 0:
  print("delicious")
elif b-a <= x:
  print("safe")
else:
  print("dangerous")
Buggy code:
x, a, b = map(int, input().split())

if a < b:
  print("delicious")
elif a >= b and a+x >= b:
  print("safe")
else:
  print("dangerous")


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

if b <= a:
  print("delicious")
elif a < b <= a+x:
  print("safe")
else:
  print("dangerous")
Buggy code:
X,A,B = map(int,input().split())

Ans = "dangerous"
if A-B>=0:
    Ans = "delisious"
elif B-A <= X:
    Ans = "safe"

print(Ans)

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

Ans = "dangerous"
if A-B>=0:
    Ans = "delicious"
elif B-A <= X:
    Ans = "safe"

print(Ans)
Buggy code:
x, a, b = map(int, input().split())

if a>b:
  print("delicious")
else:
  if x<b:
    print("safe")
  else:
    print("dangerous")

Fixed code:
x,a,b=map(int,input().split())
if a>=b:
    print("delicious")
elif (b-a)<=x:
    print("safe")
else:
    print("dangerous")
Buggy code:
X, A, B = map(int, input().split())

if B <= A:
  print("delicious")
elif A < B < X:
  print("safe")
else:
  print("dangerous")

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

if B - A <= 0:
    print("delicious")
elif B - A <= X:
    print("safe")
else:
    print("dangerous")
Buggy code:
x, a, b = map(int, input().split())

if a + x > b:
  print("delicious")
elif a+x+1>b>a+x:
  print("safe")
else:
  print("dangerous")

Fixed code:
x,a,b=map(int,input().split())
if a>=b:
  print('delicious')
elif a+x+1<=b:
  print('dangerous')
else:
  print('safe')
Buggy code:
import sys
input = sys.stdin.readline
X, A, B = [int(x) for x in input().split()]
if (A - B) <= 0:
    print("delicious")
elif (B - A) <= X:
    print("safe")
else:
    print("dangerous") 

Fixed code:
import sys
input = sys.stdin.readline
X, A, B = [int(x) for x in input().split()]
if (A - B) >= 0:
    print("delicious")
elif (B - A) <= X:
    print("safe")
else:
    print("dangerous")
Buggy code:
x, a, b = map(int, input().split())

if a>=b:
  print("delicious")
else:
  if x=<b:
    print("safe")
  if a+x+1 <= b:
    print("dangerous")

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

if a>=b:
  print("delicious")
else:
  if b-a<=x:
    print("safe")
  if a+x+1 <= b:
    print("dangerous")
Buggy code:
x, a, b = map(int, input().split)
if a >= b:
    print('delicious')
elif x + a < b:
    print('dangerous')
else:
    print('safe')

Fixed code:
x, a, b = map(int, input().split())
if a >= b:
    print('delicious')
elif x + a < b:
    print('dangerous')
else:
    print('safe')
Buggy code:
x, a, b = map(int, input().split())
if b <= a:
  print('delicious')
elif b <= x:
  print('safe')
else:
  print('dangerous')

Fixed code:
x,a,b=map(int,input().split())
if b<=a:
    print('delicious')
elif b-a<=x:
    print('safe')
else:
    print('dangerous')