Problem:


Score : 100 points

Problem Statement

Takahashi has a strong stomach. He never gets a stomachache from eating something whose "best-by" date is at most X days earlier.
He gets a stomachache if the "best-by" date of the food is X+1 or more days earlier, though.

Other than that, he finds the food delicious if he eats it not later than the "best-by" date. Otherwise, he does not find it delicious.

Takahashi bought some food A days before the "best-by" date, and ate it B days after he bought it.

Write a program that outputs delicious if he found it delicious, safe if he did not found it delicious but did not get a stomachache either, and dangerous if he got a stomachache.

Constraints

1 ≤ X,A,B ≤ 10^9

Input

Input is given from Standard Input in the following format:

X A B

Output

Print delicious if Takahashi found the food delicious; print safe if he neither found it delicious nor got a stomachache; print dangerous if he got a stomachache.

Sample Input 1

4 3 6

Sample Output 1

safe

He ate the food three days after the "best-by" date. It was not delicious or harmful for him.

Sample Input 2

6 5 1

Sample Output 2

delicious

He ate the food by the "best-by" date. It was delicious for him.

Sample Input 3

3 7 12

Sample Output 3

dangerous

He ate the food five days after the "best-by" date. It was harmful for him.



Sample input:
4 3 6


Sample output:
safe

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

def main():
    X,A,B = map(int,input().split())
    eat_day = B - A

    if(eat_day <= 0):
        print("delicious")
    elif(eat_day < X):
        print("safe")
    elif(eat_day >= X):
        print("dangerous")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

def main():
    X,A,B = map(int,input().split())
    eat_day = B - A

    if(eat_day <= 0):
        print("delicious")
    elif(eat_day >= X):
        print("safe")
    elif(eat_day < X):
        print("dangerous")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
def main():
    X,A,B = map(int,input().split())

    eat_day = B - A
    #date = X - eat_day
    if(eat_day <= 0):
        print("delicious")
    elif(eat_day > X):
        print("safe")
    elif(eat_day < X):
        print("dangerous")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
def main():
    X,A,B = map(int,input().split())

    eat_day = B - A
    #date = X - eat_day
    if(eat_day < 0):
        print("delicious")
    elif(eat_day > X):
        print("safe")
    elif(eat_day < X):
        print("dangerous")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
def main():
    X,A,B = map(int,input().split())

    eat_day = B - A
    date = X - eat_day
    if(eat_day < 0):
        print("delicious")
        sys.exit()

    if(date > 0):
        print("safe")
    elif(date < 0):
        print("dangerous")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)

d=c-b
if d<0:
    print('delicious')    
elif a<d:
    print('dangerous')
elif a>=d:
    print('safe')

Submission status: Wrong Answer

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)

d=c-b
if d<0:
    print('delicious')    
elif a<d:
    print('dangerous')
elif a>d:
    print('safe')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = list(map(int,input().split()))
m = n[2] - n[1]
x = n[0] + n[1] + 1
if n[2] <= n[1]:
  print("delicious")
elif m <= x:
  print("safe")
else:
  print("dangerous")

Submission status: Wrong Answer

Solution code:
n = list(map(int,input().split()))
m = n[2] - n[1]
x = n[0] + 1
if n[2] <= n[1]:
  print("delicious")
elif m <= x:
  print("safe")
else:
  print("dangerous")

Submission status: Wrong Answer

Solution code:
n = list(map(int,input().split()))
x = n[1] + n[0] + 1
if n[2] <= n[1]:
  print("delicious")
elif n[2] <= x:
  print("safe")
else:
  print("dangerous")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
list = [int(i) for i in input().split()]

if list[1] >= list[2]:
    print("delicious")
elif list[1]+list[0] >= list[2]:
    print("safe")
else:
    print("dengerous")

Submission status: Wrong Answer

Solution code:
list = [int(i) for i in input().split()]

if list[1] >= list[2]:
    print("delicious")
elif list[1]+list[0] >= list[2] > list[1]:
    print("safe")
elif list[2] > list[1]:
    print("dengerous")

Submission status: Wrong Answer

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

X, A, B = map(int, raw_input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
val = [int(x) for x in input().split()]

num = val[0]
num2 = val[1]
num3 = val[2]

print("delicious" if num2-num3 > 0 else "safe" if num3- num2 < num else "dangerous")

Submission status: Wrong Answer

Solution code:
X, A, B = map(int, input().split())
if A > B:
    print("delicious")
else:
    print("dangerous" if X < (B - A) else "safe")

Submission status: Wrong Answer

Solution code:
data = input().split()
(x,a,b)=[ int(i) for i in data[0:3]]

limit = ( x + a ) - b
azi = a -  b


if limit <= 0:
    print("dangerous")

elif azi >= 0:
    print("delicious")
else :
    print("safe")

Submission status: Wrong Answer

Solution code:
data = input().split()
(x,a,b)=[ int(i) for i in data[0:3]]

limit = ( x + a ) - b
azi = a -  b


if limit < 0:
        print("dangerous")
elif azi > 0:
        print("delicious")
else :
        print("safe")

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
if a[2] < a[1]:
    print("delicious")
elif a[2] >= a[1] > (a[2] - a[0]):
    print("safe")
else:
    print("dangerous")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x, a, b = map(int, raw_input().split())

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

Submission status: Wrong Answer

Solution code:

x, a, b = (int(i) for i in input().split())

e = b-a

if e <= 0:
    print("delicious")
elif e < x:
    print("safe")
elif e > x:
    print("dangerous")

Submission status: Wrong Answer

Solution code:
x, a, b = [int(i) for i in input().split()]
if b < a:
    print('delicious')
elif (b-a) < x:
    print('safe')
else:
    print('dangerous')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split()))
y = x[2]-x[1]
if y<0:
    print('delicious')
elif y<=x[0]:
    print('safe')
else:
    print('dangerous')

Submission status: Wrong Answer

Solution code:
def main():
    x, a, b = map(int, input().split())
    if b < a: print("delicious")
    elif b < a+x: print("safe")
    else: print("dangerous")
    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
if b<c:
    if c-b>a:
        print("dangerous")
    else:
        print("safe")
else:
    print("delisious")

Submission status: Wrong Answer

Solution code:
l = list(map(int, input().split()))
if l[1]+l[2] < l[0]:
    print("delicious")
else:
    if l[2]-l[1] <= l[0]:
        print("safe")
    else:
        print("dangerous")

Submission status: Wrong Answer

Solution code:
X, A, B = list(map(int, input().split(" ")))

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

Submission status: Wrong Answer

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

if B < A:
    print("delicious")
elif B < (A + X):
    print("safe")
elif B > (A + X):
    print("dangerous")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if B<=A:
    print("delicious")

elif B>=X-A:
    print("safe")

else:
    print("dangerous")

Submission status: Wrong Answer

Solution code:
X,A,B = map(int,input().split())
limit=0
if limit+X < (limit-A)+B:
    print("dangerous")
elif limit > (limit-A)+B:
    print("delicious")
else:
    print("safe")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python

import sys,math


def main():
    s = input()
    s = s.split()
    x, a, b = [int(s) for s in s]
    ans = a - b + x >= 0
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
ins = input().split()
xab = []
for i in ins:
    xab.append(int(i))
aft = (xab[2]-xab[1])
if xab[1]>=xab[2]:
    print('delicious')
elif aft>0 and aft <= xab[0]:
    print('safe')
else:
    print('dengerous')

Submission status: Wrong Answer

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

if (b - a) < 0:
    print("delicious")

elif (b - a) > 0:
    if x >= (b - a):
        print("safe")

    elif x < (b - a):
        print("dangerous")

Submission status: Wrong Answer

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

if (b - a) < 0:
    print("delicious")

elif (b - a) > 0:
    if x >= (b - a):
        print("safe")

    elif x < (b - a):
        print("dangerous")

Submission status: Wrong Answer

Solution code:
l = list(map(int, input().split()))
if l[1]+l[2] < l[0]:
    print("delicious")
else:
    if l[2]-l[1] <= l[0]:
        print("safe")
    else:
        print("dangerous")

Submission status: Wrong Answer

Solution code:
l = list(map(int, input().split()))
if l[1]+l[2] <= l[0]:
    print("delicious")
else:
    if l[2]-l[1] <= l[0]:
        print("safe")
    else:
        print("dangerous")

Submission status: Wrong Answer

Solution code:
from collections import defaultdict


def main():
    X, A, B = map(int, input().split())
    if B <= A:
        print("delicious")
    elif B - A <= X + 1:
        print("safe")
    else:
        print("dangerous")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if a >= b:
    print("delicious")

elif x + a < b:
    print("safe")

else:
    print("dangerous")

Submission status: Wrong Answer

Solution code:
x,a,b = input().split()

if a >= b:
    print("delicious")

elif x + a < b:
    print("safe")

else:
    print("dangerous")

Submission status: Wrong Answer

Solution code:
x,a,b = input().split()

if a > b:
    print("delicious")

elif x + a <= b:
    print("safe")

else:
    print("dangerous")

Submission status: Wrong Answer

Solution code:
x,a,b = input().split()

if a >= b:
    print("delicious")
    exit()

if x + a <= b:
    print("safe")
    exit()

if x + a > b:
    print("dangerous")
    exit()

Submission status: Wrong Answer

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

data = input().split()

if data[1] >= data[2]:
    print("delicious")
    exit()

if data[0] + data[1] <= data[2]:
    print("safe")
    exit()

if data[0] + data[1] > data[2]:
    print("dangerous")
    exit()

Submission status: Wrong Answer

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

data = input().split()

if data[1] >= data[2]:
    print("delicious")
    exit()

if data[0] + data[1] >= data[2]:
    print("safe")
    exit()

if data[0] + data[1] < data[2]:
    print("dangerous")
    exit()

Submission status: Wrong Answer

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

data = input().split()

if data[1] >= data[2]:
    print("delicious")
    exit()

if data[0] + data[1] >= data[2]:
    print("safe")
    exit()

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split(" ")))
x = a[0]
A = a[1]
B = a[2]

kigen = A
safe = x + A
if B < kigen:
    print("delicious")
elif B < safe:
    print("safe")
else:
    print("dangerous")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np
X,A,B = list(map(int, input().split()))
if (B<A):
    print("delicious")
if(A<=B & B<A+X):
    print("safe")
if(A+X <=B ):
    print("dangerous")

Submission status: Wrong Answer

Solution code:
X, A, B = map(int, raw_input().split())
if B-A > X:
  print 'dangerous'
else:
  print 'safe' if A <= B else 'delicious'

Submission status: Wrong Answer

Solution code:
X, A, B = map(int, raw_input().split())
if A <= B:
  print 'delicious'
else:
  print 'dangerous' if X < B-A else 'safe'

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

import sys
import subprocess
import json
import time
import math
import re
import sqlite3

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

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

Submission status: Wrong Answer

Solution code:
a = raw_input().split()
for i in range(3):
	a[i] = int(a[i])

b = a[1] - a[2]
if b > 0:
	print "delicious"
else:
	if a[0] + a[1] < a[2]:
		print "dangerous"
	else:
		print "safe"

Submission status: Wrong Answer

Solution code:
a = raw_input().split()
for i in range(3):
	a[i] = int(a[i])

b = a[1] - a[2]
if b > 0:
	print "delicious"
else:
	b = b*(-1)
	if a[0] > b:
		print "dangerous"
	else:
		print "safe"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()



def main():
    x,a,b = LI()
    if a <= b:
        return 'delicious'
    if a+x <= b:
        return 'safe'
    return 'dangerous'


print(main())

Submission status: Wrong Answer

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

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

'''
print('x', x)
print('a', a)
print('b', b)
'''

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

Submission status: Wrong Answer

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

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

'''
print('x', x)
print('a', a)
print('b', b)
'''

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

Submission status: Wrong Answer

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

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

'''
print('x', x)
print('a', a)
print('b', b)
'''

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

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
if a[1]-a[2] >0:
    print("delicious")
elif a[1]-a[2] + a[0] >= 0:
    print("safe")
else:
    print("dangerous")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if B>A+X+1:
    print("dangerous")
elif B<A:
    print("delicious")
elif B>X-A:
    print("safe")

Submission status: Wrong Answer

Solution code:
l = map(int, raw_input().split())

X = l[0]
A = l[1]
B = l[2]

if B - A > X:
	print 'dangerous'

if B - A < X:

	if A >= B:
		print 'delicious'

	else:	
		print 'safe'

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

'''
print('x', x)
print('a', a)
print('b', b)
'''

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

Submission status: Wrong Answer

Solution code:
num=raw_input('the 3 number of days:')
numberdays=num.split(' ')
if int(numberdays[2])-int(numberdays[1])>int(numberdays[0]):
    print 'dangerous'
if 0<int(numberdays[2])-int(numberdays[1])<=int(numberdays[0]):
    print 'safe'
if int(numberdays[2])-int(numberdays[1])<=0:
    print 'delicious'

Submission status: Wrong Answer

Solution code:
data = [int(i) for i in input().split()]
x = data[0]
a = data[1]
b = data[2]
if b - a < 0:
    print("delicious")
elif b - a <= x:
    print("safe")
else:
    print("dangerous")

Submission status: Wrong Answer

Solution code:
if(__name__=="__main__"):
    X, A, B =[int(i) for i in input().split()]
    #print(sum(a))
    
    if(A - B >= 0):
        print("delicious")
    elif(abs(A - B) <= X):
        print("safe")
    else:
        print("dengerous")

Submission status: Wrong Answer

Solution code:
X,A,B = list(map(int,input().split()))
if (B-A)<=X and (B-A)>0:
    print("safe")
elif (B-A)<0:
    print("delicious")
elif (B-A)>X:
    print("dangerous")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
#食品をおいしく感じた場合 delicious
#おいしくは感じなかったがお腹は壊さなかった場合 safe
#お腹を壊した場合 dangerous を出力せよ。

#X：消費期限過ぎてもOK日数
#A：消費期限前A日に購入
#B：A日に購入後、食べた日はB日後

Data = input().split()

X = int(Data[0])
A = int(Data[1])
B = int(Data[2])

set1 = A-B

if set1 > 0:
    print("delicious")

elif X + set1 > 0:
    print("safe")

else:
    print("dangerous")

Submission status: Wrong Answer

Solution code:
S = input().split()

if int(S[1]) > int(S[2]):
    print("delicious")
elif int(S[0])+int(S[1]) < int(S[2]):
    print("dangerous")
else :
    print("safe")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    for line in sys.stdin:
        X, A, B = map(lambda x: int(x), line.split(" ", 3))
        if B < A:
            print("delicious")
        elif (B - A) <= X:
            print("safe")
        else:
            print("dangerous")

if __name__ == "__main__":
    main(sys.argv)

Submission status: Wrong Answer

Solution code:
x,a,b = input().split()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

z = a - b

if z > 0:
    print("delicious")
elif z*(-1) == x:
    print("safe")
else:
    print("dangerous")

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))

if x[1]-x[2]<0:
 if x[0]>x[2]-x[1]:
  print('safe')
 else:print('dangerous')
else:
 print('delicious')


quit()

Submission status: Wrong Answer

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

z = a - b

if z > 0:
    print("delicious")
elif z*(-1) <= x:
    print("safe")
else:
    print("dangerous")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
x, a, b = map(int, input().split())
if (b-a)<0:
    print("delicious")
elif x<(b-a):
    print("dangerous")
else:
    print("safe")

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

t = a - b

if t >= 0:
    print "delicious"
    exit()

if x > -t:
    print "safe"
else:
    print "dangerous"

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
input_ = input().split(' ')
X = int(input_[0])
A = int(input_[1])
B = int(input_[2])
if B < A:
    print('delicious')
elif  B <= A+X:
    print('safe')
else:
    print('dangerous')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(X, A, B)

if A >= B:
    print('delicious')

elif A + X >= B:
    print('safe')

else:
    print('dangerous')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#Python

N = map(int, raw_input().split())
exceed=N[2]-N[1]

if exceed <N[0]:
	print "delicious"
elif exceed==N[0]:
	print "safe"
else:
	print "dangerous"

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

a()

Submission status: Wrong Answer

Solution code:
def ini(): return int(input())
def inli(): return list(map(int, input().split()))
def inf(): return float(input())
def inlf(): return list(map(float, input().split()))
def inl(): return list(input())
def pli(): return "".join(list(map(str, ans)))

a=inli()

if a[1]-a[2] > 0:
    print("delicious")
elif (a[0]+a[1])-a[2]>0:
    print("safe")
else:
    print("dangerous")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,A,B=map(int,raw_input().split(' '))


if B-A<0:
    print 'delicious'
elif B-A<X:
    print 'safe'
else:
    print 'dangerous'

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding: utf-8
X,A,B = map(int, input().split())
if A+X < B:
    print('dangelous')
elif A < B:
    print('safe')
else:
    print('delicious')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# 4 3 6

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

if y < 0:
 print("delicious")
elif y <= x:
 print("safe")
else:
 print("dangerous")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x, a, b = map(int, raw_input().split())

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

Submission status: Wrong Answer

Solution code:
X, A, B = map(int, input().split())
if B - A <= 0:
	print('delicious')
elif B - A <= X:
	print('safe')
else:
	print('dengerous')

Submission status: Time Limit Exceeded

Solution code:
x,a,b=map(int,input().split())
ans=0
for i in range(10**9):
  ans=(ans+i)%2
print(ans)

Submission status: Accepted

Solution code:
X, A, B = map(int, input().split())
if B <= A:
    print('delicious')
elif B <= A + X:
    print('safe')
else:
    print('dangerous')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X, A, B = map(int, input().split())
if B <= A:
    print('delicious')
elif B <= A + X:
    print('safe')
else:
    print('dangerous')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if b-a<=0:
    ans="delicious"
elif b-a<=x:
    ans="safe"
else:
    ans="dangerous"

print(ans)

Submission status: Accepted

Solution code:
lst = input().split()

X = int(lst[0])
A = int(lst[1])
B = int(lst[2])

d = B - A

if d <= 0:
   print('delicious')
elif d <= X:
   print('safe')
else:
   print('dangerous')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, A, B = list(map(int, input().split()))
if A - B >= 0:
    print('delicious')
elif A + X - B >= 0:
    print('safe')
else:
    print('dangerous')

Submission status: Accepted

Solution code:
# A - Expired?
def main():
    x, a, b = map(int, input().split())

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



if __name__ ==  "__main__":
    main()

Submission status: Accepted

Solution code:
X,A,B=map(int,input().split())
if B-A<=0 :
  print("delicious")
elif B-A<X+1 :
  print("safe")
else :
  print("dangerous")

Submission status: Accepted

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

if A >= B:
    print('delicious')
elif A + X < B:
    print('dangerous')
else:
    print('safe')