Problem:


﻿Score: 100 points

Problem Statement

In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.

Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.

Determine if there exists a pair of antennas that cannot communicate directly.

Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.  

Constraints

a, b, c, d, e and k are integers between 0 and 123 (inclusive).

a < b < c < d < e

Input

Input is given from Standard Input in the following format:

a
b
c
d
e
k

Output

Print :( if there exists a pair of antennas that cannot communicate directly, and print Yay! if there is no such pair.

Sample Input 1

1
2
4
8
9
15

Sample Output 1

Yay!

In this case, there is no pair of antennas that cannot communicate directly, because:

the distance between A and B is 2 - 1 = 1

the distance between A and C is 4 - 1 = 3

the distance between A and D is 8 - 1 = 7

the distance between A and E is 9 - 1 = 8

the distance between B and C is 4 - 2 = 2

the distance between B and D is 8 - 2 = 6

the distance between B and E is 9 - 2 = 7

the distance between C and D is 8 - 4 = 4

the distance between C and E is 9 - 4 = 5

the distance between D and E is 9 - 8 = 1

and none of them is greater than 15. Thus, the correct output is Yay!.

Sample Input 2

15
18
26
35
36
18

Sample Output 2

:(

In this case, the distance between antennas A and D is 35 - 15 = 20 and exceeds 18, so they cannot communicate directly.
Thus, the correct output is :(.



Sample input:
1
2
4
8
9
15


Sample output:
Yay!

Submission status: Wrong Answer

Solution code:
a, b, c, d, e, k = int(input()), int(input()), int(input()),int(input()), int(input()), int(input())
if abs(a-b)<k and abs(a-c)<k and abs(a-d)<k and abs(a-e)<k and abs(b-c)<k and abs(b-d)<k and abs(b-e)<k and abs(c-d)<k and abs(c-e)<k and abs(d-e)<k:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
l=[int(input()) for i in range(5)]
k=int(input())
f=0
for i in range(5):
  for j in range(i,5):
    if abs(l[i]-l[j])>k:
      f+=1
      print(":(")
      break
if f==0:
  print("Yay!")

Submission status: Wrong Answer

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

# In[2]:


coord = [int(input()) for i in range(5)]
k = int(input())


# In[3]:


diff = [0]*4
for i in range(4):
    diff[i] = coord[i+1] - coord[i]


# In[5]:


if max(diff) <= k:
    print('Yay!')
else:
    print(':(')


# In[ ]:

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
    a.append(int(input()))
k = int(input())

if max(a) - min(a) > k:
    print(":(")

print("Yay!")

Submission status: Wrong Answer

Solution code:
a, b, c, d, e = int(input()), int(input()), int(input()), int(input()), int(input())
if abs(e-a) > int(input()):
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
#coding:utf-8

import sys

L = list(int(input()) for i in range(6))

for i in range(4):
        for j in range(4):
            if abs(L[i]-L[j]) > L[5]:
                print(":(")
                sys.exit()

print("Yay!")

Submission status: Wrong Answer

Solution code:
#coding:utf-8

import sys

L = list(int(input()) for i in range(6))

for i in range(4):
        for j in range(4):
            if abs(L[i]-L[j] > L[5]):
                print(":(")
                sys.exit()

print("Yay!")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
print(n//min(a)+4 if min(a) == 1 else n//min(a)+5)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
print((n//min(a))+4)

Submission status: Wrong Answer

Solution code:
num = []
n = int(input())
for i in range(5):
    num.append(int(input()))
a = min(num)
t = n // a
t += 4
print(t)

Submission status: Wrong Answer

Solution code:
a=[0,1,2,3,4]
for i in range(5):
    a[i]=int(input())
k=int(input())
if max(a)-min(a)<k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k = map(int, [input() for i in range(6)])
if (e - a) < k:
  print('Yay1')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k = map(int, [input() for i in range(6)])
if (e - a) <= k:
  print('Yay1')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
arr = []
for i in range(5):
  arr.append(int(input()))
k = int(input())
if k > max(arr) - min(arr):
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
arr = []
for i in range(5):
  arr.append(int(input()))
k = int(input())
if k < max(arr) - min(arr):
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (k-e) > 0:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (k-e) >= 0:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (e-k) >= 0:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (e-k) > 0:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
s = []
for i in range(6):
  s.append(int(input()))
if(s[4]-s[0]) < s[5]:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
N = int(input())

lst_A = []

for i in range(5):
    lst_A.append(input())
    lst_A[i] = int(lst_A[i])

lst_A.sort()

ans = N // lst_A[0]

if N % lst_A[0]:

    ans += 1

ans += 4

print(ans)

Submission status: Wrong Answer

Solution code:
l=[]
for a in range(6):
  l.append(int(input()))
if l[4]-l[0]<l[5]:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
a, b, c, d, e, k = [int(input()) for i in range(6)]
if e-a > k:
    print(':(')
else:
    print('Yay')

Submission status: Wrong Answer

Solution code:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

time = 0
mini = 10
for x in n:
    rest = x%10
    if rest != 0:
        mini = min(rest, mini)
    while x%10 != 0:
        x += 1
    time += x
print(time-10+mini)

Submission status: Wrong Answer

Solution code:
# B - Five Dishes

n = []
for _ in range(5):
    n.append(int(input()))

mini = 10
for y, x in enumerate(n):
    rest = x % 10 
    if rest != 0:
        if rest < mini:
            mini = rest
            mini_num = y 
            
time = n.pop(mini_num)
for x in n:
    if x % 10 != 0:
        item = x + (10-x%10)
        time += item
    else:
        item = x
        time += item
    
print(time)

Submission status: Wrong Answer

Solution code:
N, *x = map(int, open(0))
print(5 + ((N - 1) // min(x)))

Submission status: Wrong Answer

Solution code:
A = [int(input()) for i in range(6)]
print('Yay!' if len(list(filter(lambda x: x >= A[-1], A))) == 0 else ':(')

Submission status: Wrong Answer

Solution code:
A = [int(input()) for i in range(6)]
print('Yay!' if len(list(filter(lambda x: x > A[-1], A))) == 0 else ':(')

Submission status: Wrong Answer

Solution code:
from collections import deque

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

c1 = deque(list(0 for i in range(N)))
c2 = deque()
c3 = deque()
c4 = deque()
c5 = deque()
c6 = deque()

counter = 0
def transfer(start, end, capacity):
    for i in range(capacity):
        if len(start) != 0:
            end.append(start.pop())
        else:
            break

while len(c6) != N:
    counter += 1
    transfer(c5, c6, E)
    transfer(c4, c5, D)
    transfer(c3, c4, C)
    transfer(c2, c3, B)
    transfer(c1, c2, A)
print(counter)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if k >= e -a:
    print("Yay!")
else:
    print(":\(")

Submission status: Wrong Answer

Solution code:
inputstr1 = [input() for inputstr1 in range(6)]

a = int(inputstr1[0])
b = int(inputstr1[1])
c = int(inputstr1[2])
d = int(inputstr1[3])
e = int(inputstr1[4])
k = int(inputstr1[5])

inputmax = max(a, b, c, d, e)
inputmin = min(a, b, c, d, e)


if inputmax - inputmin <= k :
    print("yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-d > k or d-c > k or c-b > k or b-a > k:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
k = int(input())
list = []
for i in range(5):
    a = int(input())
    list.append(a)

direct = False
for i in range(5):
    for j in range(5):
        if abs(list[i]-list[j]) > k:
            direct = True
    if direct:
            break
if direct:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
list = [a,b,c,d,e]
direct = True
for i in range(5):
    for j in range(5):
        if abs(list[i]-list[j]) < k:
            direct = True
        else:
            direct = False
            break
if direct == True:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a < k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
import sys
a, b, c, d, e, k = map(int,sys.stdin.readlines())
if e - a >= k:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
antena = []
for i in range(5):
	n = int(input())
	antena.append(n)
k = int(input())

bad_flag = False
for i,ant in enumerate(antena):
	if abs(ant - antena[i]) > k :
		bad_flag = True
	if bad_flag :
		break

if bad_flag :
	print(":(")
else :
	print("Yay!")

Submission status: Wrong Answer

Solution code:
da=[int(input()) for i in range(6)]
if da[4]-da[0]<da[5]:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a, b, c, d, e, k = [int(input()) for i in range(6)]
if e - a < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a,b,c,d,e=[int(input()) for i in range(5)]
a1=a//10
a2=a%10
if a2==0:
    a1-=1
    a2=10
b1=b//10
b2=b%10
if b2==0:
    b1-=1
    b2=10
c1=c//10
c2=c%10
if c2==0:
    c1-=1
    c2=10
d1=d//10
d2=d%10
if d2==0:
    d1-=1
    d2=10
n=e//10
m=e%10
if m==0:
    n-=1
    m=10
min1=min(a2,b2,c2,d2,m)
if a2==10 or b2==10 or c2==10 or d2==10 or m==10:
    ans=(a1+b1+c1+d1+n+5)*10+min1
else:
    ans=(a1+b1+c1+d1+n+4)*10+min1
print(ans)

Submission status: Wrong Answer

Solution code:
a=list(map(int, [input() for i in range(6)]))
if(a[4]-a[0])>a[5]:
    print(':(')
else:
    print('Yey!')

Submission status: Wrong Answer

Solution code:
a=list(map(int, [input() for i in range(6)]))
if a[4]-a[0]>a[5]:
    print(':(')
else:
    print('Yey')

Submission status: Wrong Answer

Solution code:
a=list(map(int, [input() for i in range(6)]))
if(a[4]-a[0])>a[5]:
    print(':(')
else:
    print('Yey')

Submission status: Wrong Answer

Solution code:
a=list(map(int, [input() for i in range(6)]))
if(a[4]<a[0])>a[5]:
    print(':(')
else:
    print('Yey')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if(e-a>k):
    print(':(')
else:
    print('Yey')

Submission status: Wrong Answer

Solution code:
a=list(map(int, [input() for i in range(6)]))
if(a[4]-a[0]>a[5]):
    print(':(')
else:
    print('Yey')

Submission status: Wrong Answer

Solution code:
a=list(map(int, [input() for i in range(6)]))
if(a[4]-a[0]<=a[5]):
    print('Yay')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a=list(map(int, [input() for i in range(6)]))
if(a[4]-a[0]<a[5]):
    print('Yay')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
L = []

for i in range(5):
   L.append(int(input()))
k = int(input())
L.sort()
print(L)
if L[-1] - L[0] > k:
  print(":(")

else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
x = []
for i in range(5):
    x.append(int(input()))

k=int(input())

for i in range(len(x) - 1):
    print('i=' + str(i))
    for j in range(i + 1, len(x)):
        print(' j=' + str(j))
        print(x[j] - x[i])
        if x[j] - x[i] > k:
            print(':(')
            quit()
    
print('Yay!')

Submission status: Wrong Answer

Solution code:
x = []
for i in range(5):
    x.append(int(input()))

k=int(input())

for i in range(len(x) - 1):
    print('i=' + str(i))
    for j in range(i + 1, len(x)):
        print(' j=' + str(j))
        print(x[j] - x[i])
        if x[j] - x[i] > k:
            print(':(')
            quit()
    
print('Yay')

Submission status: Wrong Answer

Solution code:
n = input().rsplit()
point = [int(i) for i in n]
max_dist = 0
for i in range(len(point)-2):
    dist = point[-2] - point[i]
    if dist > max_dist:
        max_dist = dist
if max_dist > point[-1]:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
n = input().rsplit()
point = [int(i) for i in n]
max_dist = 0
for i in range(len(point)-2):
    for j in range(i+1, len(point)-1):
        dist = point[j] - point[i]
        if dist > max_dist:
            max_dist = dist

if max_dist > point[-1]:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
n = input().rsplit()
point = [int(i) for i in n]
max_dist = 0
for i in range(len(point)-1):
    for j in range(i, len(point)-1):
        dist = point[j] - point[i]
        if dist > max_dist:
            max_dist = dist

if max_dist > point[-1]:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
n = input().rsplit()
point = [int(i) for i in n]
max_dist = 0
for i in range(len(point)):
    for j in range(i, len(point)):
        dist = point[j] - point[i]
        if dist > max_dist:
            max_dist = dist

if max_dist > point[-1]:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
a,*_,e,k=[int(input())for x in' '*6];print([':(','Yey!'][e-a<=k])

Submission status: Wrong Answer

Solution code:
poss = [int(input()) for i in range(5)]
k = int(input())

if poss[-1] - poss[0] < k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if b - a <= k:
    if c - b <= k:
        if d - c <= k:
            if e - d <= k:
                print("Yay!")
            else:
                print(":(")
        else:
            print(":(")
    else:
        print(":(")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
l = []
for _ in range(5):
    l.append(int(input()))

k = int(input())

ans = []
for i in range(5):
    for j in range(5):
        ans.append(abs(l[i] - l[j])>k) 

print([':(','Yay!'][all(ans)])

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
input = [a,b,c,d,e]
answer = "Yay!"

for count1 in range(0,4):
    for count2 in range(0,4):
        stock = input[count2] - input[count1]
        if stock > k:
            answer = ":("
            break
print(answer)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (b-a<=k and c-b<=k and d-c<=k and e-d<=k):
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (b-a>=k and c-b>=k and d-c>=k and e-d>=k):
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
N = int(input())                                                                                                                                             
CN = 6                                                                                                                                                       
                                                                                                                                                             
TC = [0] * (CN-1)                                                                                                                                            
for i in range(CN-1):                                                                                                                                        
    TC[i] = int(input())                                                                                                                                     
                                                                                                                                                             
                                                                                                                                                             
time = CN - 1                                                                                                                                                
                                                                                                                                                             
min_TC = N                                                                                                                                                   
for i in range(CN-1):                                                                                                                                        
    if TC[i] < min_TC:                                                                                                                                       
        time = time + min_TC//TC[i]                                                                                                                          
        min_TC = TC[i]                                                                                                                                       
                                                                                                                                                             
print(time)

Submission status: Wrong Answer

Solution code:
N = int(input())                                                                                                                                             
CN = 6                                                                                                                                                       
                                                                                                                                                             
TC = [0] * (CN-1)                                                                                                                                            
for i in range(CN-1):                                                                                                                                        
    TC[i] = int(input())                                                                                                                                     
                                                                                                                                                             
                                                                                                                                                             
time = CN - 1                                                                                                                                                
                                                                                                                                                             
min_TC = N                                                                                                                                                   
for i in range(CN-1):                                                                                                                                        
    if TC[i] < min_TC:                                                                                                                                       
        min_TC = TC[i]                                                                                                                                       
        time = time + min_TC//TC[i]                                                                                                                          
                                                                                                                                                             
print(time)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a < k and a < b < c < d < e:
  print('Yay!')
  
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
A = []
for _ in range(5):
    A.append(int(input()))
ans = sum(A)
mod = [i % 10 for i in A]
ans = ans - 10 + min(mod)
print(ans)

Submission status: Wrong Answer

Solution code:
var = {}
for i in range(6):
    var[i] = input()

a = int(var[0]) - int(var[4])

if a < 0:
    a = a * -1

if a > int(var[5]):
    print(":(")
else:
    print("yay!")

Submission status: Wrong Answer

Solution code:
var = {}
for i in range(6):
    var[i] = input()

a = int(var[0]) - int(var[4])

if a < 0:
    a = a * -1

if a >= int(var[5]):
    print(":(")
else:
    print("yay!")

Submission status: Wrong Answer

Solution code:
var = {}
for i in range(6):
    var[i] = input()
    
if int(var[0]) - int(var[4]) >= int(var[5]):
    print(":(")
else:
    print("yay!")

Submission status: Wrong Answer

Solution code:
var = {}
count = 0

for i in range(5):
    var[i] = input()

k = input()

for j in range(5):
    for k in range(5):
        if int(var[4 - j]) - int(var[4 - k]) > int(k):
            count = 1
            break

if count == 0:
    print("yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
var = {}
count = 0

for i in range(6):
    var[i] = input()

for j in range(5):
    for k in range(5):
        if int(var[j]) - int(var[k]) > int(var[5]):
            count = 1
            break

if count == 0:
    print("yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a <= k:
    print("yay")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
	print('Yay')
else:
	print(':(')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
	print("Yay")
else:
	print(":(")

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
	print('Yay!')
else:
	print(':)')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<k:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
l = []; t = True
for i in range(5):
  l.append(int(input()))
k = int(input())
for i in range(5):
  for j in range(i+1,5):
    if abs(l[j] - l[i]) > k:
      t = False
      break
if t:
  print('Yay')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (e-a) < k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
ans = 0
for i in [a, b, c, d, e]:
    for j in [a, b, c, d, e]:
        if i != j and k <= j - i:
            ans = 1

if ans == 1:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if(e - a >= k):
  print(":(")
else:
  print("Yai!")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if max(a,b,c,d,e)-min(a,b,c,d,e) < k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
import sys
data = []
for i in range(5):
    data.append(int(input()))
k = int(input())
data.sort()
for i in data:
    for j in data[i+1:]:
        if j - i <= k:
            print('Yay!')
            sys.exit()
        else:
            continue
print(':(')

Submission status: Wrong Answer

Solution code:
import sys
data = []
for i in range(5):
    data.append(int(input()))
k = int(input())
data.sort()
for i in data:
    for j in data[i+1:]:
        if j - i < k:
            print('Yay!')
            sys.exit()
        else:
            continue
print(':(')

Submission status: Wrong Answer

Solution code:
import sys
data = []
for i in range(5):
    data.append(int(input()))
k = int(input())
data.sort()
for i in data:
    for j in data[i+1:]:
        if j - i < 15:
            print('Yay!')
            sys.exit()
        else:
            continue
print(':(')

Submission status: Wrong Answer

Solution code:
List=[int(input()) for i in range(5)]
k=int(input())
if List[-1]-List[0]>k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if(e - a > k):
  print(":(")
else:
  print("Yai!")

Submission status: Wrong Answer

Solution code:
# -*- coding: <utf8> -*-
array =[]
miss = 0
for i in range(6):
  i = int(input())
  array.append(i)
for i in range(5):
  for k in range(4 - i):
    if array[i + k] -array[i] >= array[5]:
      print(":(")
      miss = 1
      break
    
if miss == 0:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
# -*- coding: <utf8> -*-
array =[]
for i in range(6):
  i = int(input())
  array.append(i)
for i in range(5):
  for k in range(4 - i):
    if array[i + k] -array[i] >= array[5]:
      print(":(")
      break
  if i == 4:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
# -*- coding: <utf8> -*-
array =[]
for i in range(6):
  i = int(input())
  array.append(i)
for i in range(5):
  for k in range(4 - i):
    if array[i + k] -array[i] >= array[5]:
      print(":(")
      break
    else:
      if i == 4:
        print("Yay!")

Submission status: Wrong Answer

Solution code:
a = []
for i in range(6):
    a.append(input())

b = 0
for i in range(5):
    if b == 1:
        break
    for j in range(4-i):
        ans = abs(int(a[i]) - int(a[j]))
        if ans > int(a[5]):
            print(':(')
            b = 1
            break
        
    if i == 4 and b == 0:
        print('Yay!')

Submission status: Wrong Answer

Solution code:
n=int(input())
c=list(map(int,[input() for _ in range(5) ]))

if n!=min(c):
    print(n//min(c)+4+c.count(min(c)))
else:
    print(5)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
v=[]
v.append(a)
v.append(b)
v.append(c)
v.append(d)
v.append(e)

i=0
l=0
p_l=[]
while i<5:
       j=i
       while j<5:
              p=v[j]-v[i]
              p_l.append(p)
              j+=1
       i+=1

count=0
n=len(p_l)
while l<n:
       if p_l[l]>k:
              count+=1

       
       l+=1
if count>0:
       print(":)")
else:
       print("Yay!")

Submission status: Wrong Answer

Solution code:
t_list=[int(input()) for i in range(5)]
k = int(input())

def hoge(t_list, k):
  for i in range(4):
    if t_list[i] > k :
      return(":(")
  return("Yay!")

print(hoge(t_list, k))

Submission status: Wrong Answer

Solution code:
l = sorted(list(map(int, [input() for i in range(5)])))
k = int(input())

if l[-1] - l[0] < k:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
num = list()
for ii in range(5):
    num.append(int(input()))
dist = int(input())

if num[-1] - num[0] <= dist:
    print('Yah!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
if len(n)==0:
  n.append(0)
ans = ans*10-10+min(n)
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
if n == []:
  n.append(0)
ans = ans*10-10+min(n)
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
n.append(0)
ans = ans*10-10+min(n)
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = list()
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10) 
ans = ans*10-10+min(n)
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10) 
ans = ans*10-10+min(n)
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)

ans = ans*10-10+min(n)
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

As = [a,b,c,d,e]
if max(As) - min(As) > k:
    print(":(")
    exit()

print("Yey!")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
mxdst = max([b-a,c-b,d-c,e-d])
if mxdst > k:
	print(':(')
else:
	print('Yay!')