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:
l = [0] * 5
for i in range(5):
  l[i] = int(input())
k = int(input())

for i in range(5):
  for j in range(5):
    if abs(i - j) < k:
      print(':(')
      exit()

print('Yay!')

Submission status: Wrong Answer

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

for i in range(5):
  for j in range(5):
    if abs(i - j) > k:
      print(':(')
      exit()
print('Yay!')

Submission status: Wrong Answer

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

count = 0

for i in range(4):
    if(data_[i+1]-data_[i]<=k):
        count += 1
        break
        
print("Yay!") if count>0 else print(":(")

Submission status: Wrong Answer

Solution code:
A = [int(input()) for i in range(5)]
k = int(input())
ans = 0
for i in range(5):
    for x in range(i,5):
        if A[x] - A[i] > k:
            ans = ans + 1
print(ans)
if ans > 0:
    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())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k=[int(input()) for i in range(6)]
if abs(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 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())

spot = e-a
if spot <= k:
    print("Yal!")
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())

spot = max(b-a,c-b,d-c,e-d)
if spot <= 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())

spot = max(b-a,c-b,d-c,e-d)
if spot <= k:
    print("Yal!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(0,6):
  a.append(int(input()))
ans=0
for j in range(1,5):
  if a[j]-a[j-1]>a[5]:
    ans+=1
    
if ans==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())

diff = [a-b,b-c,c-d,d-e]

if max(diff)>k:
  ret = ":("
else:
  ret = "Yay!"

print(ret)

Submission status: Wrong Answer

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

for i in d:
  for j in d:
    if abs(i-j)>15:
      count=1

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

Submission status: Wrong Answer

Solution code:
def check_num():
  if b-a > k or c-a > k or d-a > k or e-a > k or c-b > k or d-b > k or e-b > k or d-c > k or e-c > k or e-d > k:
    print(":(")
  else:
    print("Yey!")


a, b, c, d, e, k = [int(input()) for _ in range(6)]
check_num()

Submission status: Wrong Answer

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

for i in range(1, len(ant)):
    if (ant[i] - ant[i-1]) >= k:
        print(":(")
        sys.exit()
print("Yay!")

Submission status: Wrong Answer

Solution code:
a, b, c, d, e, k = [int(input()) for i in range(6)]

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())
ant_list=[a,b,c,d,e]
print(ant_list)
ant_list.sort()
if (ant_list[-1]-ant_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(""))
M=max(a,b,c,d,e)
m=min(a,b,c,d,e)
sa=M-m
if sa<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(""))
M=max(a,b,c,d,e)
m=min(a,b,c,d,e)
sa=M-m
if sa>=k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

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

if max(l)-min(l) > k:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
a,b,c,d,e = [int(input()) for _ in range(5)]
k = int(input())

print("Yay!" if abs(a - e) <= k else ":)")

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(5)]
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,b,c,d,e = [int(input()) for _ in range(5)]
k = int(input())

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

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:
N = int(input())
ride = [0] * 5
for i in range(5):
	ride[i] = int(input())

narrow = min(ride)
if N != narrow:
	minuites = N // narrow + 5
else:minuites = N // narrow + 4
  
print(minuites)

Submission status: Wrong Answer

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

k = int(input())
ans = max(diff_L)-min(diff_L)
print(ans)

if ans <= 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())
l1 = [a,b,c,d,e]
l3 = []
lk = []
for i in l1:
    for j in l1:
            x = abs(j - i)
            l3.append(x)
for _ in range(20):
    lk.append(k)
if l3 <= lk:
    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())
ans1 = ("Yay!")
ans2 = (":(")
s = [a,b,c,d,e]
p = int()
for i in range(5):
    if s[4] - s[i] >= k:
        p = 0
    elif s[3] - s[i] >= k:
        p = 0
    elif s[2] - s[i] >= k:
        p = 0
    elif s[1] - s[i] >= k:
        p = 0
    else:
        p = 1
if p == 1:
    print(ans1)
else:
    print(ans2)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
ans1 = ("Yay!")
ans2 = (":(")
s = [a,b,c,d,e]
p = int()
for i in range(5):
    if s[4] - s[i] >= k:
        print(ans2)
    elif s[3] - s[i] >= k:
        print(ans2)
    elif s[2] - s[i] >= k:
        print(ans2)
    elif s[1] - s[i] >= k:
        print(ans2)
    else:
        p = 1
if p == 1:
    print(ans1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
li= []
for i in range(5):
  a = int(input())
  li.append(a)
val = int(input())
for i in range(0,5):
  for j in range(i,5):
    diff = abs(li[i]-li[j])
    if diff > val:
      print(':(')
    else:
      continue

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
list = []
for n in range(5):
  list.append(int(input()))
list.sort()

if abs(list[0]-list[-1]) >= int(input()):
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a[4]-a[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())
isConnect = False
if e - a < k:
    if e - b < k:
        if e - c < k:
            if e - d < k:
                if d - a < k:
                    if d - b < k:
                        if d - c < k:
                            if c - a < k:
                                if c - b < k:
                                    if b - a < k:
                                        isConnect = True
if isConnect:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
*a,k=[int(input()) for _ in range(6)]
print("Yay!" if max(a)-min(a)<k else ":(")

Submission status: Wrong Answer

Solution code:
#2019/10/04
N, A, B, C, D, E = list(map(int, open(0).read().split()))
# print(N)
print(-(-N//min(A,B,C,D,E)) + 4)

Submission status: Wrong Answer

Solution code:
#2019/10/04
N, A, B, C, D, E = list(map(int, open(0).read().split()))
# print(N)
print(-~(N//min(A,B,C,D,E)) + 4)

Submission status: Wrong Answer

Solution code:

'''A - Five Antennas
https://atcoder.jp/contests/abc123/tasks/abc123_a

>>> main([1, 2, 4, 8, 9, 15])
Yay!
>>> main([15, 18, 26, 35, 36, 18])
:(
'''

from itertools import permutations


def main(_input, k):
    for p in permutations(_input, 2):
        if p[0] - p[1] >= k:
            print(':(')
            return

    print('Yay!')


if __name__ == "__main__":
    _input = []

    for _ in range(5):
        _input.append(int(input()))

    k = int(input())

    main(_input, k)

Submission status: Wrong Answer

Solution code:

'''A - Five Antennas
https://atcoder.jp/contests/abc123/tasks/abc123_a

>>> main([1, 2, 4, 8, 9, 15])
Yay!
>>> main([15, 18, 26, 35, 36, 18])
:(
'''

from itertools import permutations


def main(_input):
    for p in permutations(_input, 2):
        if p[0] - p[1] >= 15:
            print(':(')
            return

    print('Yay!')


if __name__ == "__main__":
    _input = []

    for _ in range(6):
        _input.append(int(input()))

    main(_input)

Submission status: Wrong Answer

Solution code:
#2019/10/03
# a, b, c, d, e, k = list(map(int, open(0).read().split()))
# print("Yay!" if (b-a<=k and c-a<=k and d-a<=k and d-a<=k and e-a<=k and c-b<=k and d-b<=k and e-b<=k and d-c<=k and e-c<=k and e-d<=k) else ":(") )

antn = list(map(int, open(0).read().split()))
flg = 0
for i in range(0,3):
    for j in range(i+1, 3):
        if (antn[j] - antn[i] > antn[5]):
            flg = 1
print("Yay!" if flg == 0 else ":(")

Submission status: Wrong Answer

Solution code:
#2019/10/03
# a, b, c, d, e, k = list(map(int, open(0).read().split()))
# print("Yay!" if (b-a<=k and c-a<=k and d-a<=k and d-a<=k and e-a<=k and c-b<=k and d-b<=k and e-b<=k and d-c<=k and e-c<=k and e-d<=k) else ":(") )

antn = list(map(int, open(0).read().split()))
flg = 0
for i in range(0,3):
    for j in range(i+1, 4):
        if (antn[j] - antn[i] > antn[5]):
            flg = 1
print("Yay!" if flg == 0 else ":(")

Submission status: Wrong Answer

Solution code:
#2019/10/03
# a, b, c, d, e, k = list(map(int, open(0).read().split()))
# print("Yay!" if (b-a<=k and c-a<=k and d-a<=k and d-a<=k and e-a<=k and c-b<=k and d-b<=k and e-b<=k and d-c<=k and e-c<=k and e-d<=k) else ":(") )

antn = list(map(int, open(0).read().split()))
flg = 0
for i in range(0,4):
    for j in range(i+1, 4):
        if (antn[j] - antn[i] > antn[5]):
            flg = 1
print("Yay!" if flg == 0 else ":(")

Submission status: Wrong Answer

Solution code:
li = []
flag = True
for i in range(6):
  li.append(int(input()))
for i in range(4):
  for j in range(i+1,5):
    d = li[j] - li[i]
    if d > li[5]:
      print(":(")
      flag = False
      break
    elif i == 3 and j == 4 and flag == True:
      print("Yay!")

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 = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l = [a, b, c, d, e]
for i in range(len(l)-1):
  for j in range(len(l)):
    if l[i]-l[j] >= k:
      print(":(")
      quit()
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())
l = [a, b, c, d, e]
for i in range(len(l)-1):
  for j in range(len(l)):
    if l[i]-l[j] > k:
      print(":(")
      quit()
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())
l = [a, b, c, d, e]
for i in range(len(l)-1):
  for j in range(1, len(l)):
    if l[i]-l[j] > k:
      print(":(")
      quit()
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())
l = [a, b, c, d, e]
for i in range(len(l)-1):
  for j in range(1, len(l)):
    if l[i]-l[j] > k:
      print(":(")
      quit()
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())
l = [a, b, c, d, e]
for i in range(len(l)-1):
  for j in range(1, len(l)):
    if l[i]-l[j] > k:
      print(":)")
      quit()
print("Yay!")

Submission status: Wrong Answer

Solution code:
a_list = []
[a_list.append(int(input())) for i in range(5)]
k = int(input())
print("Yay!") if k > (max(a_list)-min(a_list)) 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 and c-a<=k and d-a<=k and d-b<=k and e-b<=k and e-c<=k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=[int(input()) for i in range(5)]
k=int(input())
print("Yay" if abs(max(s)-min(s)) else ":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = [int(input()) for i in range(5)]
k = int (input())
min_dis = min([abs(A[i] - A[j]) for i in range(5) for j in range(i+1, 5)])
print(":(") if min_dis > k else print("Yay!")

Submission status: Wrong Answer

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

a = input()
b = input()
c = input()
d = input()
e = input()
k = input()

length = e - a

if length > k:
    print (":(")
else:
    print ("yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(4):
  for j in range(i+1,4):
    if s[j]-s[i]>k:
      print(':(')
      exit()

print('Yay!')

Submission status: Wrong Answer

Solution code:
x = [int(input()) for i in range(5)]
k = int(input())
flag = 0
for i in range(4):
  for j in range(3):
    if x[i] - x[j] > k:
      flag = 1
      break
else:
  if flag == 1:
    print(":(")
  else:
    print("Yay!")

Submission status: Wrong Answer

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

if s[4]-s[0]<k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

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

distance = []
for i in range(4):
    for j in range(4):
        distance.append(anntena[j + 1] - anntena[i])
    
tmp = [i for i in distance if not i  >= k ]
if len(tmp) == 0:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

distance = []
for i in range(4):
    distance.append(anntena[i + 1] - anntena[i])
    
tmp = [i for i in distance if not i  >= k ]
if len(tmp) == 0:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

distance = []
for i in range(4):
    distance.append(anntena[i + 1] - anntena[i])
    
tmp = [i for i in distance if not i  >= 0 ]
if len(tmp) == 0:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
lst = []
for _ in range(5):
    lst.append(int(input()))
k = int(input())
if abs(lst[0] - lst[-1]) < k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
lst = []
for _ in range(5):
    lst.append(int(input()))
k = int(input())
if abs(lst[0] - lst[-1]):
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
N = 5
lst = []
for e in range(N):
    lst.append(int(input()))
k = int(input())
flag = True
for i,a in enumerate(lst):
    if not flag:
        break
    l = lst[i:]
    for b in l:
        if abs(a-b) > k:
            flag = False
            break
if flag:
    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:
a = [int(input()) for _ in range(5)]
k = int(input())
for i in range(len(a)):
  for j in range(i+1,len(a)):
    print(a[i],a[j])
    if abs(a[i]-a[j])>k:
      print(":(")
      quit()
print("Yay!")

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
for i in range(len(a)):
  for j in range(4-i):
    if a[i]-a[j]>k:
      print(":(")
      quit()
print("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
base_num = int(input())
diff_list = []

for i in range(4):
  next_num = int(input())
  diff_list.append(next_num - base_num)
  base_num = next_num
  
k = int(input())  
print('Yay!' if max(diff_list) <= k else ':(')

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 = 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 = 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 = 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=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:
x = [int(input()) for _ in range(6)]

if x[4] - x[0] <= x[5]:
    print('Yey!')
else:
    print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
L = [int(input()) for i in range(6)]
#print(L)
d = max(L[0:4])-min(L[0:4])

if d > L[5]:
    print(':(')
else:
    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())
print((max(n//a+1, n//b+1, n//c+1, n//d+1, n//e+1)) + 4)

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!')

if e - a >= k:
    print(':(')

Submission status: Wrong Answer

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

a=[-(-n[i]//10)*10 for i in range(len(n))]
b=[n[i]%10 for i in range(len(n)) if n[i]%10 != 0]
if b != []:
    print(sum(a) + min(b) -10)
else:
    print(sum(a))

Submission status: Wrong Answer

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

a=[-(-n[i]//10)*10 for i in range(len(n))]
b=[n[i]%10 for i in range(len(n)) if n[i]%10 != 0]
print(a,b)
if b != []:
    print(sum(a) + min(b) -10)
else:
    print(sum(a))

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

Submission status: Wrong Answer

Solution code:
a=list(int(input()) for i in range(5))

b=[-(-a[i]//10)*10 for i in range(5)]
c=[a[i]%10 for i in range(5) if a[i]%10 != 0]

print(sum(b) + min(c) -10)

Submission status: Wrong Answer

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

if max(n[0], n[1], n[2], n[3], n[4]) - min(n[0], n[1], n[2], n[3], n[4]) < n[5]:
  print("Yay!")  
else:
  print(":(")

Submission status: Wrong Answer

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

if max(n[0], n[1], n[2], n[3], n[4]) - min(n[0], n[1], n[2], n[3], n[4])> n[5]:
  print("Yay!")  
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
n = [int(input()) for i in range(6)]
cnt = 0
for i in range(len(n)-1):
  for j in range(i+1, len(n)-1):
    if n[j+1] - n[i] > 0:
      cnt += 1
    else: break

if cnt == 10:
  print("Yay!")  
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
n = [int(input()) for i in range(6)]
cnt = 0
for i in range(len(n)-1):
  for j in range(i+1, len(n)-1):
    if n[j+1] - n[i] > 0:
      cnt += 1
    else:
      break

if cnt == 10:
  print("Yay!")  
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
n = [int(input()) for i in range(6)]
cnt = 0
for i in range(len(n)-1):
  for j in range(i+1, len(n)-1):
    if n[j+1] - n[i] > 0:
      cnt += 1
    else:
      break

if cnt != 10:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
n = [int(input()) for i in range(6)]
cnt = 0
for i in range(len(n)-1):
  for j in range(i+1, len(n)-1):
    if n[j+1] - n[i] > 0:
      cnt += 1
    else:
      exit()
      
if cnt == 10:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
import math

times = [0]*5
for i in range(5):
    times[i] = int(input())

#1桁目が一番小さいものを判断する
mini = 9
idx = 9
for time in times:
    if time%10 < mini and time%10 > 0:
        mini = min(mini,time%10)
        idx = times.index(time)

total = 0
for i in range(5):
    if i == idx:
        total += times[i]
    else:
        total += math.ceil(times[i]/10)*10
print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
L=[int(input()) for i in range(5)]
k=int(input())
ans = 0
for i in range(4):
  d = L[i+1] - L[i]
  if d > k:
    break
  else:
    ans += 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

l = [int(input()) for i in range(6) ]
print(":(" if l[4] - l[0] >= l[5] else "Yay!")

Submission status: Wrong Answer

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

for m in l:
  for n in l:
    if abs(m-n) >= k:
      print(":(")
      exit()

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())

list=[a,b,c,d,e]
for i in range(4):
    for j in range(i+1,5):
        if list[i]-list[j]>k:
            a=1
if a==1:
    print(":(")
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
a = [None] * 5
for i in range(5):
  a[i] = int(input())
k = int(input())
ans = 'Yay!'

for i in range(4):
  if a[i] + k < a[i+1]:
    ans = ':('
    break
print(ans)

Submission status: Wrong Answer

Solution code:
from math import ceil
N = int(input())
lst = []
min = 10**15
for i in range(5):
    x = int(input())
    lst.append(x)
    if min > x:
        min = x
        loc = i

time = 4 + ceil(N/min) 
print(time)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]
ans = "Yay!"
for i in range(5):
    for j in range(4 - i):
        if a[j] - a[i] > a[5]:
            ans = ":("
print(ans)

Submission status: Wrong Answer

Solution code:
data = []
for i in range(5):
    data.append(int(input()))
k = int(input())
data.sort()
if data[4] - data[0] > k:
    print(":(")
else:
    print("Yey!")

Submission status: Wrong Answer

Solution code:
data = []
for i in range(6):
    data.append(int(input()))
for i in range(5):
    for j in range(5):
        if abs(data[i] - data[j]) > data[5]:
            print(":(")
            exit()
print("Yey!")

Submission status: Wrong Answer

Solution code:
A = [int(input()) for _ in range(5)]
K = int(input())
print('Yay' if A[4] - A[0] <= K else ':(')

Submission status: Wrong Answer

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

k=int(input())

i=0
while i<4:
  j=i+1
  while j<5:
    if abs(r[i]-r[j])>k:
      print("Yay!")
      exit()
    
    j+=1
  i+=1
  
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:
ds = []
for i in range(5):
    ds.append(int(input()))
k = int(input())

cnt = 0
for i in range(5):
    for j in range(i + 1, 5):
        if abs(ds[i] - ds[j]) <= k:
            cnt += 1
if cnt > 0:
    print(':(')
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
abcde = [0] * 5
for i in range(5):
  abcde[i] = int(input())

k = int(input())

ans = "Yay!"
for i in range(4):
  if abcde[i+1] - abcde[i] > k:
    ans = ":("
    break
print(ans)

Submission status: Wrong Answer

Solution code:
a_list = []

for i in range(5):
  a_list.append(int(input()))

N = int(input())

ctr = 0

flag = 0

while ctr < 4:
  if a_list[ctr+1] - a_list[ctr] >= N:
    flag += 1
  ctr += 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
an=[int(input()) for i in range(5)]
k=int(input())
'''count=0
for j in range(5):
    for i in range(5):
        if j<i and an[i]-an[j]>=k:
            count+=1
if count==0:
    print('Yay!')
else:
    print(':(')
'''

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

Submission status: Wrong Answer

Solution code:
Li = list(int(input()) for _ in range(6))
F =[1  for i in range(4) for j in range(i,4) if abs(Li[j]-Li[i]) <= Li[5]]
print ("Yay!" if len(F)==10 else ":(")

Submission status: Wrong Answer

Solution code:
Li = list(int(input()) for _ in range(6))
F =[1  for i in range(4) for j in range(i,4) if abs(Li[j]-Li[i]) < Li[5]]
print ("Yay!" if len(F)==10 else ":(")

Submission status: Wrong Answer

Solution code:
Li = list(int(input()) for _ in range(6))
F =[1  for i in range(4) for j in range(i,4) if abs(Li[j]-Li[i]) < Li[5]]
print ("Yay!" if len(F)==20 else ":(")

Submission status: Wrong Answer

Solution code:
an=[int(input()) for i in range(5)]
k=int(input())
count=0
for j in range(5):
    for i in range(5):
        if j<i and an[i]-an[j]>=k:
            count+=1
if count==0:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
1
2
4
8
9
15

Submission status: Wrong Answer

Solution code:
lst=[]
for i in range(5):
	lst.append(int(input()))
print(lst)
k = int(input())
sor = sorted(lst)
if sor[4] - sor[0] > k:
	print(":(")
else:
	print("Yay!")