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 = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
mxdst = max([b-a,c-b,d-a,e-d])
if mxdst > k:
	print(':(')
else:
	print('Yay!')

Submission status: Wrong Answer

Solution code:
antenna_coordinates = [int(input()) for i in range(5)]
distance_limit = int(input())
result = 'Yay!'

for i in range(1, 4):
    if abs(antenna_coordinates[0] - antenna_coordinates[i]) > distance_limit:
        result = ':('
        break

print(result)

Submission status: Wrong Answer

Solution code:
antenna_coordinates = [int(input()) for i in range(5)]
distance_limit = int(input())
result = 'Yay!'

for i in range(4):
    if abs(antenna_coordinates[0] - antenna_coordinates[i]) > distance_limit:
        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())

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

Submission status: Wrong Answer

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

for i in range(4):
    for j in range(i,5):
        if abs(a_list[i] - a_list[j]) > k:
            print(":(")
print("Yay!")

Submission status: Wrong Answer

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

L = [int(input()) for _ in range(6)]
ans = "Yay!"
for l1, l2 in zip(L, L[1:-1]):
    if l2-l1 <= L[-1]:
        continue
    else:
        ans = ":("
print(ans)

Submission status: Wrong Answer

Solution code:
a = sorted(list(map(int, [input() for i in range(5)])))
k = int(input())
if (a[4] - a[0]) <= k:
  print('Yap!')
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:
    print(':(')  
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
import math

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

a=math.ceil(A/10)
b=math.ceil(B/10)
c=math.ceil(C/10)
d=math.ceil(D/10)
e=math.ceil(E/10)

loss=max(a-A/10,b-B/10,c-C-10,d-D/10,e-E/10)

time=a+b+c+d+e-loss

print(int(time*10))

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 (k - (b - a) + 1) * (k - (c - a) + 1) * (k - (d - a) + 1) * (k - (e - a) + 1) * (k - (c - b) + 1) * (k - (d - b) + 1) * (k - (e - b) + 1) * (k - (d - c) + 1) * (k - (e - c) + 1) * (k - (e -d) + 1) > 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 - (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)) >= 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 - (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)) > 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())
count = 0
all_list = [a, b, c,d,e]
for i in all_list:
    if i > k:
        count += 1
if count >= 1:
    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())
count = 0
all_list = [a, b, c,d,e]
for i in all_list:
    if i > k:
        count += 1
if count > 1:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
#coding:utf-8

def main():
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())
    k = int(input())

    flag = True

    if b-a >= k:
        flag = False
    elif c-a >= k:
        flag = False
    elif d-a >= k:
        flag = False
    elif e-a >= k:
        flag = False
    elif c-b >= k:
        flag = False
    elif d-b >= k:
        flag = False
    elif e-b >= k:
        flag = False
    elif d-c >= k:
        flag = False
    elif e-c >= k:
        flag = False
    elif d-e >= k:
        flag = False

    if flag:
        print('Yay!')
    else:
        print(':(')


if __name__ == "__main__":
    main()

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:
  ans = 'Yay!'
else:
  ans = ':('

Submission status: Wrong Answer

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

#print ("N:",N)
#print ("cities:",cities)

ans = 0

people = [N,0,0,0,0,0]
latest = 0

# maybe O(N)
'''
while True:
	if (people[-1] == N):
		break
	else:
		for i in reversed(range(len(cities))):
			tmp = people[i]
			people[i] = max(0, people[i] - cities[i])
			people[i+1] += tmp - people[i]


	ans += 1
'''

critical = N // min(cities) 
if N % min(cities) != 0:
	critical += 1


print (4 + critical)

Submission status: Wrong Answer

Solution code:
import itertools
cnt=0
z=[]
for n in range(5):
    z.append(int(input()))
k = int(input())
c= list(itertools.combinations(z,2))
for i in c:
    temp = list(i)
    if temp[1]-temp[0]<k:
        cnt+=1
if cnt==10:
    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())

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

Submission status: Wrong Answer

Solution code:
a,b,c,d,e=[int(input()) for i in range(5)]
import math
A,B,C,D,E=[math.ceil(a/10),math.ceil(b/10),
math.ceil(c/10),math.ceil(d/10),math.ceil(e/10)]
x=[a%10,b%10,c%10,d%10,e%10]
m=0 
while m<=4:
 if x[m]==0:
  x[m]=x[m]+10
  m=m+1
 else:
  x[m]=x[m] 
  m=m+1
d=min(x)

print(int((A+B+C+D+E)*10-10+d))

Submission status: Wrong Answer

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

t = max(a, b, c, d, e)

if k <= t:
    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())

t = max(a, b, c, d, e)

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
#a,b,c,d,e,k = 2,4,7,8,15,1
#box = [a,b,c,d,e]
box = []
for i in range(0,5):
    box.append(int(input()))
k = int(input())
c = 0
for i in range(0,4):
    if box[i+1] - box[i] > k :
        c +=1
    else:
        pass
if c == 0:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
#a,b,c,d,e,k = 2,4,7,8,15,1
#box = [a,b,c,d,e]
box = []
for i in range(0,5):
    box.append(int(input()))
k = int(input())
c = 0
for i in range(0,4):
    if box[i+1] - box[i] > k :
        c +=1
    else:
        pass
if c == 0:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
a, b, c, d, e = [int(input()) for i in range(5)]
k = int(input())
if e-a > k*4:
  print(":(")
elif e-b > k*3 or d-a > k*3:
  print(":(")
elif e-c > k*2 or d-b > k*2 or c-a > k*2:
  print(":(")
elif 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:
ant = []
for s in range(5):
    ant.append(int(input()))
k=int(input())

if max(ant)-k > 0:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(4):
    b=int(input())
    a.append(b)
c=int(input())
if max(a) - min(a) <= c:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(4):
    b=int(input())
    a.append(b)
c=int(input())
if max(a) - min(a) < c:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

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

for i in range(5):
    for k in range(i+1,5):
        list2.append(list1[k]-list1[i])

if max(list2) <= k:
    print ("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

if max(list1) <= k:
    print ("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(0,5):
  a.append(int(input()))
s=0
import math
for i in a:
  s=s+(math.ceil(i/10))*10
x=10
for i in a:
  if i%10==0:
    pass
  elif i%10<x:
    x=i%10
print(s-10+x)

Submission status: Wrong Answer

Solution code:
A=[]
for i in range(0,6):
  A.append(int(input()))
end=1
for i in range(0,5):
  for j in range(i,5):
    if A[j]-A[i]>A[5]:
      end=0
      break
if end==0:
    print(":(")
else:
	print("Yey!")

Submission status: Wrong Answer

Solution code:
A=[]
for i in range(0,6):
  A.append(int(input()))
print(A)
end=1
for i in range(0,5):
  for j in range(i,5):
    print(A[j]-A[i])
    if A[j]-A[i]>A[5]:
      end=0
      break
if end==0:
    print(":(")
else:
	print("Yey!")

Submission status: Wrong Answer

Solution code:
A=[]
for i in range(0,6):
  A.append(int(input()))

end=1
for i in range(0,5):
  for j in range(i,5):
    if A[j]-A[i]>=A[5]:
      end=0
      break
if end==0:
    print(":(")
else:
	print("Yey!")

Submission status: Wrong Answer

Solution code:
A=[]
for i in range(0,6):
  A.append(int(input()))

end=1
for i in range(0,4):
  for j in range(i,4):
    if A[j]-A[i]>=A[5]:
      end=0
      break
if end==0:
    print(":(")
else:
	print("Yey!")

Submission status: Wrong Answer

Solution code:
A=[]
for i in range(0,6):
  A.append(int(input()))

end=1
for i in range(0,4):
  if A[i+1]-A[i]>A[5]:
    end=0
    break
if end==0:
    print(":(")
else:
	print("Yey!")

Submission status: Wrong Answer

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

total = 0
#print(tm)
m = tm.index(min(tm, key=lambda x: int(str(x)[-1]) if (str(x)[-1] != "0") else 10))

tmp = tm.pop(m)

#print(tm)

for x in range(len(tm)):
    total = round(tm[x], -1) + total
    #print(total)
total = tmp + total

print(total)

Submission status: Wrong Answer

Solution code:
lis = []

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

NUM = int(input())

count = 0
correct = 0
for i in range(5):
    for k in range(i + 1, 5):
        if lis[k] - lis[i] < NUM and lis[i] - lis[k] < NUM:
            correct += 1
        count += 1

if count == correct:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
lis = []

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

NUM = int(input())

count = 0
correct = 0
for i in range(5):
    for k in range(i + 1, 5):
        if lis[k] - lis[i] < NUM or lis[i] - lis[k] < NUM:
            correct += 1
        count += 1

if count == correct:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
lis = []

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

NUM = int(input())

count = 0
correct = 0
for i in range(5):
    for k in range(i + 1, 5):
        if lis[k] - lis[i] < NUM:
            correct += 1
        count += 1

if count == correct:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

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

print(len(crd))
for x in range(len(crd)):
    for y in range(x+1, len(crd)-x):
        print(x, y)
        print(crd[int(x)], crd[int(y)])
        z = k - (crd[y] - crd[x])
        print("z= ", z)
        if z < 0:
            print(":(")
            break
    else:
        continue
    break
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(">>"))

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

Flag = "Yay!"
for i in range(5):
    for j in range(5):
        if abs(list[i] - list[j]) > k:
            Flag = ":("
            break
print(Flag)

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]

Flag = "Yay!"
for i in range(5):
    for j in range(5):
        if abs(list[i] - list[j]) > k:
            Flag = ":("
            break
print(Flag)

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]

Flag = "Yay!"
for i in range(5):
    for j in range(5):
        if abs(list[i] - list[j]) == 0:
            pass
        elif abs(list[i] - list[j]) > k:
            Flag = ":("
            break
print(Flag)

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(5):
    for j in range(5):
        if abs(list[i] - list[j]) == 0:
            pass
        elif abs(list[i] - list[j]) > k:
            Flag = ":("
            break
        elif abs(list[i] - list[j]) <= k:
            Flag = "Yay!"
print(Flag)

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

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())
if a%10==0:
    a_q=a
else:
    a_q=(a//10+1)*10
if b%10==0:
    b_q=b
else:
    b_q=(b//10+1)*10
if c%10==0:
    c_q=c
else:
    c_q=(c//10+1)*10
if d%10==0:
    d_q=d
else:
    d_q=(d//10+1)*10
if e%10==0:
    e_q=e
else:
    e_q=(e//10+1)*10

r=[i for i in [a%10,b%10,c%10,d%10,e%10]  if i%10!=0]
if r==[]:
    r_min=10
else:
    r_min=min(r)

ans=a_q+b_q+c_q+d_q+e_q-10+r_min
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())
answer = ""
if(e - a >= k or e - b >= k or e - c >= k or e - d >= k or d - a >= k or d - b >= k or d - c >= k or c - a >= k or c - b >= k or b - a >= k):
    answer = ":("
else:
    answer = "Yay!"
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())
answer = ""
if(e - a >= k):
    answer = ":("
else:
    answer = "Yay!"
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 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:
# -*- coding:utf-8 -*-

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

for i in range(5):
    for j in range(i):
        if k <= abs(a[i]-a[j]):
            print(":(")
            exit()
print("Yay!")

Submission status: Wrong Answer

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

for a, b in zip(arr, arr[1:]):
    if b - a > k:
        print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = [int(input()) for _ in range(5)]
max_distance = int(input())
distance = l[-1] - l[0]
if max_distance > distance:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
inpl = []
inpl.append(int(input()))
inpl.append(int(input()))
inpl.append(int(input()))
inpl.append(int(input()))
inpl.append(int(input()))
d = int(input())
print(max(inpl),min(inpl))
print(':(' if d < (max(inpl) - min(inpl)) else 'Yay!')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
inpl = []
inpl.append(int(input()))
inpl.append(int(input()))
inpl.append(int(input()))
inpl.append(int(input()))
inpl.append(int(input()))
d = int(input())
print(max(inpl),min(inpl))
print(':(' if d < (max(inpl) - min(inpl))
      else 'Yay!')

Submission status: Wrong Answer

Solution code:
inpl = []
inpl.append(int(input()))
inpl.append(int(input()))
inpl.append(int(input()))
inpl.append(int(input()))
inpl.append(int(input()))
d = int(input())
print(':(' if d > max(inpl) - min(inpl) else 'Yay!')

Submission status: Wrong Answer

Solution code:
x = list((int(i) for i in range(5)))
k = int(input())
M = max(x)
m = min(x)

if M - m <= k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
x = list((int(i) for i in range(5)))
k = int(input())
M = max(x)
m = min(x)

if k >= (M - m):
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
x = list((int(i) for i in range(5)))
k = int(input())
M = max(x)
m = min(x)

if k >= M - m:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
x=list((int(i)for i in range(5)))
k=int(input())
M=max(x)


if k >= M:
    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 >= (a - e):
    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 = 0

ant_list = []

ant_list.append(a)
ant_list.append(b)
ant_list.append(c)
ant_list.append(d)
ant_list.append(e)

judge = True

for i in range(len(ant_list) - 1):

    for j in range(5-i):
        diff  = ant_list[4-j] - ant_list[i]
        print(diff)
        if diff > k:
            judge = False
            break
    else:
        continue

if judge:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
from sys import stdin

i = [int(x) for x in stdin.readlines()]
j = i[-1]
i.pop()

if max(i)-min(i) > j:
  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 abs(a-b)<=k:
  if abs(a-c)<=k:
    if abs(a-d)<=k:
      if abs(a-e)<=k:
        if abs(b-c)<=k:
          if abs(b-d)<=k:
            if abs(b-e)<=k:
              if abs(c-d)<=k:
                if abs(c-e)<=k:
                  if abs(d-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())
f=min(a,b,c,d,e)
g=max(a,b,c,d,e)
h=g-f
if h <= k:
  print('Yay')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
N = int(input())
cyapa = []
for i in range (1,6):
    cyapa.append(int(input()))
kasu = min(cyapa)
if kasu >= N:
    ans = 5
else:
    ans = 5 + (N-1)//kasu
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from itertools import combinations

antennae = [int(input()) for _ in range(5)]
k = int(input())

com = [True if antennae[i] - antennae[j] <= k else False for i, j in combinations(range(5), 2)]
if sum(com) == len(list(combinations(range(5), 2))):
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
from itertools import combinations

antennae = [int(input()) for _ in range(5)]
k = int(input())

com = [True if antennae[i] - antennae[j] <= k else False for i, j in combinations(range(4), 2)]
if sum(com) == len(list(combinations(range(4), 2))):
    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-a:
	print(":(")
else:
	print("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
stay_a=N
stay_b=0
stay_c=0
stay_d=0
stay_e=0
stay_f=0
for i in range(100000000000000):
  delta_a=min(stay_a,A)
  stay_a=stay_a-delta_a
  delta_b=min(stay_b,B)
  stay_b=stay_b-delta_b
  delta_c=min(stay_c,C)
  stay_c=stay_c-delta_c
  delta_d=min(stay_d,D)
  stay_d=stay_d-delta_d
  delta_e=min(stay_e,E)
  stay_e=stay_e-delta_e
  stay_b+=delta_a
  stay_c+=delta_b
  stay_d+=delta_c
  stay_e+=delta_d
  stay_f+=delta_e
  if stay_f==N:
    break
print(1+i)

Submission status: Wrong Answer

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

o=int()

if (b-a >k):
  o = 1
elif (c-b >k):
  o = 1
elif (d-c >k):
  o = 1
elif (e-d >k):
  o = 1
elif (a-e >k):
  o = 1
else:
  o = 0

if( o == 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())

o=int()

if (b-a >k):
  o = 1
elif (c-b >k):
  o = 1
elif (d-c >k):
  o = 1
elif (e-d >k):
  o = 1
  print()
elif (a-e >k):
  o = 1
else:
  o = 0

if( o == 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())

o=int()

if (b-a >k):
  o = 1
else:
  o = 0

if (c-b >k):
  o = 1
else:
  o = 0
  
if (d-c >k):
  o = 1
else:
  o = 0
  
if (e-d >k):
  o = 1
else:
  o = 0

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

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
    a.append(int(input()))
b =[]
c = []
for i in range(5):
    b.append(int(a[i]))
for i in range(5):
    while b[i] > 10:
        b[i] = b[i] - 10
if min(b) == 10:
    ans = sum(a)
else:
    for i in range(5):
    	c.append(int(a[i]) +10 -int(b[i]))
    d = sum(c)
    mini = min(b)
    ans = d - 10 + mini
print(ans)

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
    a.append(int(input()))
b =[]
c = []
for i in range(5):
    b.append(int(a[i]))
for i in range(5):
    while b[i] > 10:
        b[i] = b[i] - 10
if min(b) == 10:
    ans = sum(a)
else:
    for i in range(5):
    	c.append(int(a[i] +10 -b[i]))
    d = sum(c)
    mini = min(b)
    ans = d - 10 + mini
print(ans)

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
    a.append(int(input()))
b =[]
c = []
for i in range(5):
    b.append(int(a[i]))
for i in range(5):
    while b[i] > 10:
        b[i] = b[i] - 10
if min(b) == 10:
    ans = sum(a)
else:
    for i in range(5):
        if b[i] == 10:
        	c.append(int(a[i]))
        if b[i] != 10:
        	c.append(int(a[i] +10 -b[i]))
    d = sum(c)
    mini = min(b)
    ans = d - 10 + mini
print(ans)

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
    a.append(int(input()))
b =[]
c = []
for i in range(5):
    b.append(int(a[i]))
for i in range(5):
    while b[i] > 10:
        b[i] = b[i] - 10
if min(b) == 10:
    ans = sum(a)
else:
    for i in range(5):
        if b[i] == 10:
                c.append(int(a[i]))
        if b[i] != 10:
                c.append(int(a[i]) +10 -int(b[i]))
    d = sum(c)
    mini = min(b)
    ans = d - 10 + mini
print(ans)

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
    a.append(int(input()))
b =[]
c = []
for i in range(5):
    b.append(int(a[i]))
for i in range(5):
    while b[i] > 10:
        b[i] = b[i] - 10
if min(b) == 10:
    ans = sum(a)
else:
    for i in range(5):
        if b[i] == 10:
                c.append(int(a[i]))
        if b[i] != 10:
                c.append(int(a[i] +10 -b[i]))
        d = sum(c)
        mini = min(b)
        ans = d - 10 + mini
print(ans)

Submission status: Wrong Answer

Solution code:
import math
l = [int(input()) / 10 for i in range(5)]
min_l = min(l)
l.remove(min_l)
l = [math.ceil(i) for i in l]
ans = int((sum(l) + min_l)*10)
print(ans)

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
    a.append(int(input()))
b =[]
c = []
for i in range(5):
    b.append(int(a[i]))
for i in range(5):
    while b[i] > 10:
        b[i] = b[i] - 10
if min(b) == 10:
    ans = sum(a)
else:
    for i in range(5):
        if b[i] == 10:
                c.append(int(a[i]))
        if b[i] != 10:
                c.append(int(a[i] +10 -b[i]))
        d = sum(c)
        mini = min(b)
        ans = d - 10 + mini
    print(ans)

Submission status: Wrong Answer

Solution code:
a = []
for i in range(5):
    a.append(int(input()))
b =[]
c = []
for i in range(5):
    b.append(int(a[i]))
for i in range(5):
    while b[i] > 10:
        b[i] = b[i] - 10
if min(b) == 10:
    ans = sum(a)
else:
    for i in range(5):
        if b[i] == 10:
                c.append(int(a[i]))
        if b[i] != 10:
                c.append(int(a[i] +10 -b[i]))
        d = sum(c)
        mini = min(b)
        ans = d - 10 + mini
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))
ansls=[]
k = int(input())
for i in range(4):
    m = ls[i+1]-ls[i]
    ansls.append(m)

if max(ansls)>k:
    print(':(')
else:
    print('Yay!')

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

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