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:
lst = []
for i in range(5):
    lst.append(int(input()))
lst_f=[]
for i in range(5):
    lst_f.append(lst[i]%10)
while 0 in lst_f:
    lst_f.remove(0)
if len(lst_f) == 0:
    print(sum(lst))
else:
    print(sum(lst)-sum(lst_f)+10*(len(lst_f)-1)+min(lst_f))

Submission status: Wrong Answer

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

if a[4]-a[0] < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
inpt=[input() for i in range(6)]
a=int(inpt[0])
e=int(inpt[4])
k=int(inpt[5])
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())

x = [a,b,c,d,e]

x.sort()
if x[4] - x[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())

x = [a,b,c,d,e]

x.sort()
if x[4] - x[0] > k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

count = 0
if (max(num) - min(num)) > k:
    print(':()')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
if __name__ =="__main__":
    kyori = []
    for x in range(5):
        kyori.append(input())
    
    k = input()

    max_length=int(kyori[4])-int(kyori[0])

    if max_length < int(k):
        print("Yay!")
    else:
        print(":(")

Submission status: Wrong Answer

Solution code:
# ABC123A - Five Antennas
lst = list(map(int, [input() for _ in range(5)]))
k = int(input())
answer = "Yay!"

for i in range(4, 0, -1):
    for j in range(4 - i):
        if lst[i] - lst[j] > k:
            answer = ":("

print(answer)

Submission status: Wrong Answer

Solution code:
# ABC123A - Five Antennas
lst = list(map(int, [input() for _ in range(5)]))
k = int(input())
answer = "Yay!"

for i in range(4, 0, -1):
    for j in range(4 - i):
        if lst[i] - lst[0] > k:
            answer = ":("

print(answer)

Submission status: Wrong Answer

Solution code:
# ABC123A - Five Antennas
lst = sorted(list(map(int, [input() for _ in range(5)])), reverse=True)
k = int(input())
answer = 'Yay!'

for i in range(4):
    for j in range(4 - i, i, -1):
        if lst[1] - lst[j] > k:
            answer = ':('
            break
    break
            
print(answer)

Submission status: Wrong Answer

Solution code:
# ABC123A - Five Antennas
lst = sorted(list(map(int, [input() for _ in range(5)])), reverse=True)
k = int(input())
answer = 'Yay!'

for i in range(4):
    for j in range(4, i, -1):
        if lst[1] - lst[j] > k:
            answer = ':('
            break
    break
            
print(answer)

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
	a.append(int(input()))
k = int(input())
 
for i in range(4):
  for j in range(i+1, 5): 
    if a[j] - a[i] > k :
      print(": (")
      exit()
 
print("Yay!")

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
	a.append(int(input()))
k = int(input())
 
for i in range(4):
  for j in range(i+1, 4): 
    if a[j] - a[i] > k :
      print(":(")
      exit()
 
print("Yay!")

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
	a.append(int(input()))
k = int(input())
 
for i in range(4):
  for j in range(i+1, 4): 
    if a[j] - a[i] > k :
      print(": (")
      exit()
 
print("Yay!")

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
	a.append(int(input()))
k = int(input())
 
for i in range(4):
  for j in range(i,4): 
    if a[j] - a[i] > k :
      print(": (")
      exit()
 
print("Yay!")

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
	a.append(int(input()))
k = int(input())
 
for i in range(4):
  if a[i+1] - a[i] > k :
    print(": (")
    exit()
 
print("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(4):
  if abs(ant[i]-ant[i+1]) > k:
    print(':(')
    break
else:
  print('Yay!')

Submission status: Wrong Answer

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

for i in range(4):
  if abs(ant[i]-ant[i+1]) > k:
    print(':(')
    break
else:
  print('Yay')

Submission status: Wrong Answer

Solution code:
import math
for a in range(3*10**6):
    print(1)

Submission status: Wrong Answer

Solution code:
import math
for a in range(10**6):
    print(1)

Submission status: Wrong Answer

Solution code:
import math
for a in range(10**5):
    print(1)

Submission status: Wrong Answer

Solution code:
import math
for a in range(1000):
    print(1)

Submission status: Wrong Answer

Solution code:
import math
for a in range(100):
    print(1)

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:
i = 0
alice = []
while i < 5:
    a = input()
    alice.append(a)
    i += 1
k = input()
alice.sort()
alice.reverse()
an = int(alice[0]) - int(alice[4])
if an >= int(k):
    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 and e-b<=k and e-c<=k and e-d<=k:
 print(':(')
else:
 print('Yay!')

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
a =[int(input()) for _ in range(5)]
print(math.ceil(n / min(a) + 4))

Submission status: Wrong Answer

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

# アンテナと距離に分ける
i = [a[0], a[1], a[2], a[3], a[4]]
k = a[5]

flag = False
itr = 0
while True:
  x = itr
  while True:
    x+=1
    if x >= 5:
      break
    elif(i[itr] - i[x]) > k:
      flag = True
  itr+=1
  if itr == 5:
    break
    
if flag:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

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

b = int(input())

if a[4] - a[0] < b:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

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

for i in range(4):
    for j in range(i + 1, 5):
        if abs(a[i]-a[j]) > k:
            print(':(')
            break
    break
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc123
# -*- coding: utf-8 -*-

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

k = int(input())

result = "Yay!"
for i in v:
    for j in range(5):
        if abs(i-j) > k:
            result = ":("
            break

if k is 0:
    result = "Yay!"
print(result)

Submission status: Wrong Answer

Solution code:
#https://atcoder.jp/contests/abc123
# -*- coding: utf-8 -*-

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

k = int(input())

result = "Yay!"
for i in v:
    for j in range(5):
        if abs(i-j) > k:
            result = ":("
            break

print(result)

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]

m = 1
n = 0
N = 0
while n <= 4 :
    while m <= 4 :
        if list[ m ] - list[ n ] >= k :
            N = N + 1
            m = m + 1
        else :
            m = m + 1
    n = n + 1
if N == 0 :
    print( "Yay!" )
else :
    print( ":("  )

Submission status: Wrong Answer

Solution code:
*a, = map(int, open(0).read().split())
k = a.pop()
#print(a,k)
c = 'Yay!'
for i in a:
    for j in a:
        if j-i > k:
            c = ''
            break
print(c)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
minutes = [int(input()) for _ in range(5)]
time=0
l=[]
 
for i in minutes:
    time += i
    if(i%10==0):
        l.append(0)
    else:
        l.append(10-i%10)
 
l.sort()
time += sum(l[:-1])
print(time)

Submission status: Wrong Answer

Solution code:
res=[]
a=[]
des=False
for i in range(0,5):
    a.append(int(input()))
k=int(input())
x=len(a)
count=0

for i in range(0,x):
    count=count+1
    for j in range(0,x):
        dis=a[j]-a[i]
        if(k<=dis):
            des=True

if(des==False):
    print("Yay!")
elif(des==True):
    print(":(")

Submission status: Wrong Answer

Solution code:
res=[]
a=[]
des=False
for i in range(0,5):
    a.append(int(input()))
k=int(input())
x=len(a)
count=0

for i in range(0,x):
    count=count+1
    for j in range(count,x):
        dis=a[j]-a[i]
        if(k<=dis):
            des=True

if(des==False):
    print("Yay!")
elif(des==True):
    print(":(")

Submission status: Wrong Answer

Solution code:
res=[]
a=[]
des=False
for i in range(0,5):
    a.append(int(input()))
k=int(input())
x=len(a)
count=0

for i in range(0,x):
    count=count+1
    for j in range(count,x):
        dis=a[j]-a[i]
        res.append(dis)
x=len(res)

for i in range(0,x):
    if(k<=res[i]):
        des=True
if(des==False):
    print("Yay!")
elif(des==True):
    print(":(")

Submission status: Wrong Answer

Solution code:
res=[]
a=[]
des=0
for i in range(0,5):
    a.append(int(input()))
k=int(input())
x=len(a)
count=0

for i in range(0,x):
    count=count+1
    for j in range(count,x):
        dis=a[j]-a[i]
        res.append(dis)
x=len(res)

for i in range(0,x):
    if(k<=res[i]):
        des=des+1

if(des==0):
    print("Yay!")
elif(des>=1):
    print(":(")

Submission status: Wrong Answer

Solution code:
input_nums = []
input_count = 5

for i in range(0,input_count):
  input_nums.append(int(input()))

allowed_distance = int(input())

for i in range(0,input_count-1):
  for j in range(i+1,input_count-1):
    if (input_nums[j] - input_nums[i]) > allowed_distance:
      print(':(')
      exit()

print('Yay!')

Submission status: Wrong Answer

Solution code:
N = int(input())
transport = [int(input()) for i in range(5)]

def timeToDestination(N, t):
  h = min(t)
  if N % h == 0:
    return 4 + (N // h)
  return 5 + (N // h)
  
print(timeToDestination(N, transport))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
nums = [int(input()) for _ in range(5)]

def orders(nums):
  r = [10 - (num % 10) for num in nums if (num % 10)]
  if r:
  	return sum(nums) + sum(r) - max(r)
  return sum(nums)

print(orders(nums))

Submission status: Wrong Answer

Solution code:
nums = [int(input()) for _ in range(5)]
k = int(input())

def anthennas(nums, k):
  for i in range(len(nums) - 1):
    if nums[i] + k >= nums[i+1]:
      return "Yay!"
  return ":("
  
  
print(anthennas(nums, k))

Submission status: Wrong Answer

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

k=int(input())
f=1

for i in range(len(li)):
    for j in range(i+1, len(li)):
        if abs(li[i]-li[j])>=k:
            f=0

if f:
    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('Yay!')

Submission status: Wrong Answer

Solution code:
antenna = []
bool = True

for i in range(5):
    a = int(input())
    antenna.append(a)
max_distance = int(input())

for i in range(5):
    for j in range(5):
        if abs(antenna[i] - antenna[j]) > 15:
            bool = False
            
if bool:
    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 and d-c <= k and c-b <= k and b-a <= k:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
a=int(input())
b=input()
c=input()
d=input()
e=int(input())
k=int(input())
if e-a > k:
  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('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-k > k:
  print(':(')
else:
  print('Yay')

Submission status: Wrong Answer

Solution code:
a=[0,0,0,0,0,0]

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

a.sort()
if(a[4]-a[0]>a[5]):
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
nums = [int(input()) for i in range(6)]

if nums[4] - nums[0] > nums[5]:
  print(':(')
print('Yay!')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
a_1=(a//10)*10
b_1=(b//10)*10
c_1=(c//10)*10
d_1=(d//10)*10
e_1=(e//10)*10
a_2=a%10
b_2=b%10
c_2=c%10
d_2=d%10
e_2=e%10
if a_2==0 and b_2==0 and c_2==0 and d_2==0 and e_2==0:
  a_2+=0
elif a_2==0:
  a_2+=10
elif b_2==0:
  b_2+=10
elif c_2==0:
  c_2+=10
elif d_2==0:
  d_2+=10
elif e_2==0:
  e_2+=10
else:
  a_2+=0
l=[a_2, b_2, c_2, d_2, e_2]
l.sort()
print(a_1+b_1+c_1+d_1+e_1+l[0]+40)

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(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
import numpy as np
line = np.zeros([5,])
for i in range(0,5):
    line[i] = int(input())

k = line[i] = int(input())
if line.max()-line.min()>k:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
List = []
List.append(int(input()))
List.append(int(input()))
List.append(int(input()))
List.append(int(input()))
List.append(int(input()))
k = int(input())

CW = []
for i in range(len(List)):
    for j in range(i+1,len(List)):
        if List[j]-List[i] <= k:
            CW.append(True)

if all(CW):
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
import sys
if __name__ == "__main__":
    N=6
    in_lst=[]
    for _ in range(N):
        in_lst.append(int(input()))
    for i in in_lst[:-1]:
        for j in in_lst[:-1]:
            if j-i>=in_lst[-1]:
                print(':(')
                sys.exit()
    print('Yay!')

Submission status: Wrong Answer

Solution code:
a=[]
d=[]
for i in range(5):
    a.append(int(input()))
k=int(input())
x=len(a)-1
count=0
b=5
count1=0
for i in range(0,x):
    count1=count1+1
    for j in range(count1,b):
        d.append(a[j]-a[i])
x=len(d)-1
for i in range(0,x):
    if(d[i]>=k):
        count=count+1
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 <= 15:
    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())
s = [a, b, c, d, e]
u = []
v = []
ans = 0

for i in range(len(s)):
    if s[i] % 10 == 0:
        ans += s[i]
    else:
        u.append(s[i])
        v.append(s[i] % 10)

k = min(v)
for j in range(len(u)):
    ans += u[j] + 10 - v[j]
    
ans = ans - 10 + k
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())
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())

times = [A, B, C, D, E]

def calRest(times):
	rest = 10
	for time in times:
		if time % 10 == 0:
			continue
		elif time % 10 < rest:
			rest = time % 10
	return 10 - rest

sumTime = sum([10 * (int((time-1)/10)+1) for time in times])
rest = calRest(times)
neatTime = sumTime - rest
print(neatTime)

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 & c-a<k & d-a<k & e-a<k & c-b<k & d-b<k & e-b<k & d-c<k & e-c<k & e-d<k:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

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

print(arr,k)
i=0
singi=0
if k >= arr[4] - arr[0]:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

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

i=0
singi=0
if k > arr[4] - arr[0]:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

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

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

d = a[4] - a[0]
print(':)' if d > k else 'Yay!')

Submission status: Wrong Answer

Solution code:
import itertools
import sys

def main():
    n = []
    for i in range(5):
        n.append(int(input()))
    k = int(input())
    for c in itertools.combinations(n, 2):
        if abs(c[0] - c[1]) <= k:
            print(':(')
            sys.exit()
    else:
        print('Yay!')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

 
min = min(a,b,c,d,e)

print(int((n-1)/min)+5)

Submission status: Wrong Answer

Solution code:
atoe =[int(input()),int(input()),int(input()),int(input()),int(input())]
k = int(input())

maxNum = 5
_err = 0
for i in range(0, maxNum):
    for j in range(i+1, maxNum):
        if abs(atoe[i] - atoe[j]) > k:
            _err = 1

if _err:
    print(":(")
else:
    print("Yey!")

Submission status: Wrong Answer

Solution code:
def main():
    if sub():
        print("Yay!")
    else:
        print(":(")


def sub() -> bool:
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())
    points = [a, b, c, d, e]
    k = int(input())

    for i in points:
        for j in points:
            if abs(i - j) < k:
                continue
            else:
                return False
    return True


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

a = int(input())
difs = []
for i in range(4):
    tmp = int(input())
    difs.append(tmp-a)
    a = tmp

k = int(input())

for i in difs:
    if i > k:
        print(":(")
        sys.exit()

print("Yay!")

Submission status: Wrong Answer

Solution code:
import math
dishes = [int(input()) for _ in range(5)]
lead_times = [int(math.ceil(t/10))*10 - t for t in dishes]
max_idx = lead_times.index(max(lead_times))
result = 0
for i in range(5):
  result += dishes[i]
  if i != max_idx:
    result += lead_times[i]
print(result)

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>=-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("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("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:
	if D-A>K:
		print(":(")
	else:
		if C-A>K:
			print(":(")
		else:
			if B-A>K:
				print(":(")
			else:
				print("yay!")

Submission status: Wrong Answer

Solution code:
import os
import sys



a=[input() for i in range(6)]
print(a)

for i in reversed(range(5,1)):
    if(a[i]-a[i-1]>=a[5]):
        print(":(")
        sys.exit()

print("Yay!")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
F = min([A,B,C,D,E])
T = int(N/F) + 4
print(T)

Submission status: Wrong Answer

Solution code:
p = -1
q = 124

for _ in range(5):
  a = int(input())
  p = max(p, a)
  q = min(q, a)

k = int(input())

if p - q < k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

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

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

K = int(input())

if L[4]-L[0]<K:
    ans = 'Yay!'
else:
    ans = ':('

print(ans)

Submission status: Wrong Answer

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

k = int(input())
if antennas[4] - antennas[0] < k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
import math

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
aa = math.ceil(a/10)*10
bb = math.ceil(b/10)*10
cc = math.ceil(c/10)*10
dd = math.ceil(d/10)*10
ee = math.ceil(e/10)*10
lista = [a, bb, cc, dd, ee]
listb = [aa, b, cc, dd, ee]
listc = [aa, bb, c, dd, ee]
listd = [aa, bb, cc, d, ee]
liste = [aa, bb, cc, dd, e]
suma = sum(lista)
sumb = sum(listb)
sumc = sum(listc)
sumd = sum(listd)
sume = sum(liste)
print(min(suma, sumb, sumc, sumd, sume))

Submission status: Wrong Answer

Solution code:
l = [28, 45, 30, 14, 78]
l_0 = [a%10 for a in l]
ar = []
for n in l_0:
  if n != 0:
    ar.append(10-n)
  else:
    ar.append(0)
s = ar.index(max(ar))
ar.pop(s)
ans = sum(l) + sum(ar)
print(ans)

Submission status: Wrong Answer

Solution code:
l = [int(input()) for i in range(5)]
l_0 = [a%10 for a in l]
ar = []
for n in l_0:
  if n != 0:
    ar.append(10-n)
  else:
    ar.append(0)
s = ar.index(max(ar))
ar.pop(s)
ans = sum(l) + sum(ar)
print(ans)

Submission status: Wrong Answer

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

if (anntena[-1] - anntena[0]) <= k:
  print('Yey!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(6)]
k = s[5]
cannot = 0

for i in range(4):
    if ((s[i] - s[i+1])^2 > k^2):
        cannot = cannot + 1

if (cannot != 0):
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
s = [int(input()) for i in range(6)]
k = s[5]
cannot = 0

for i in range(4):
    if ((s[i] - s[i+1])^2 > k^2):
        cannot = cannot + 1

print(cannot)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

g = [a, b, c, d, e]
h = min(g)
p = math.ceil(n / h)

print(4 + p)

Submission status: Wrong Answer

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

import math
p = math.ceil(n/min([a,b,c,d,e]))
print(4 +p)

Submission status: Wrong Answer

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

g = [a, b, c, d, e]
h = min(g)

print(4 - (-n)//h)

Submission status: Wrong Answer

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

g = [a, b, c, d, e]
h = min(g)

print(4 + (n+h-1) // h)

Submission status: Wrong Answer

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

g = [a, b, c, d, e]
h = min(g)

print(4 +  (n + h - 1)// h)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
passangers = [a, b, c, d, e]
f = min(passangers)

print(5 + 2 * (n + f - 1) // f)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
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("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())

city = [d, c, b, a]
result = 'Yay!'
for i, c in enumerate(city):
    for cC in city[i + 1:len(city)]:
        if (c - cC) > k:
            result = ':('
            break;
print(result)

Submission status: Wrong Answer

Solution code:
E=str(input())
if E=="A":
  print("T")
elif E=="T":
  print("A")
elif E=="G":
  print("C")
elif E=="C":
  print("G")

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
city = []
for i in range(5):
    city.append(int(input()))
gate = min(city)
print(4 + math.ceil(N/gate))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=[int(input()) for i in range(5)]
ans=N//min(A)
if N%min(A)!=0:
  ans+=1
print(ans+4)

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k = map(int,open(0).read().split())
print("yay!" if max(a,b,c,d,e) - min(a,b,c,d,e) <= k else ":(")

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k = int(input()),int(input()),int(input()),int(input()),int(input()),int(input())
antennas = [a,b,c,d,e]
def a(antennas, k):
  if k == 0:
    print("Yay!")
    return
  for i in range(4):
    for j in range(i,5):
      if abs(antennas[i]-antennas[j]) >= k:
        print(":(")
        return
  print("Yay!")
  return
a(antennas, k)

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k = int(input()),int(input()),int(input()),int(input()),int(input()),int(input())
antennas = [a,b,c,d,e]
def a(antennas, k):
  for i in range(4):
    for j in range(i,5):
      if abs(antennas[i]-antennas[j]) >= k:
        print(":(")
        return
  print("Yay!")
  return
a(antennas, k)

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(b-a,c-b,d-c,e-d) > k:
    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 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 (e - a > k):
  print(":(")
else:
  print("yay!")

Submission status: Wrong Answer

Solution code:
import itertools
a = []
for _ in range(5):
  a.append(int(input()))
k = int(input())
combs = itertools.combinations(a, 2)
l = [(n,m) for (n, m) in combs if m - n > k]
if len(l) == 0:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
import itertools
a = []
for _ in range(5):
  a.append(int(input()))
k = int(input())
combs = itertools.combinations(a, 2)
l = [(n,m) for (n, m) in combs if m - n > k]
if len(l) == 0:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

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

for i in range(len(distance)):  
    m = 1
    while i+m<=4:
        diff = abs(distance[i] - distance[i+m])
        m += 1
        if diff > k:
            print(":(")
            a = "too_far"
            break
    else: 
        continue
    break

if a=="not_too_far":
    print("Yay!")

Submission status: Wrong Answer

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


for i in range(len(distance)):  
    m = 1
    while i+m<=4:
        diff = abs(distance[i] - distance[i+m])
        m += 1
        if diff > k:
            print(":(")
            m = "too_far"
            break
    else: 
        continue
    break

if not m=="too_far":
    print("Yay!")

Submission status: Wrong Answer

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

for i in range(len(distance)):  
    while i+m<=4:
        diff = abs(distance[i] - distance[i+m])
        m += 1
        if diff > k:
            print(":(")
            m = "too_far"
            break
    else: 
        continue
    break

if not m=="too_far":
    print("Yay!")

Submission status: Wrong Answer

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

for i in range(len(distance)):  
    while i+m<=4:
        diff = abs(distance[i] - distance[i+m])
        m += 1
        if diff >= k:
            print(":(")
            m = "too_far"
            break
    else: 
        continue
    break

if not m=="too_far":
    print("Yay!")

Submission status: Wrong Answer

Solution code:
import sys

d = [int(i) for i in sys.stdin.read().split('\n') if i != '']
k = d[5]
d = d[:5][::-1]

result = True
for i in range(len(d[:4])):
    for j in range(i, len(d)):
        if d[i] - d[j] > 18:
            result = False

if result:
    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  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(":(")