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:
from sys import stdin

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

if (a[4] - a[0]) <= a[5]:
    print('Yey!')
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())

R=[a,b,c,d,e,k]

for i in range(4):
 f=R[i]-R[0]
 g=R[i]-R[1]
 h=R[i]-R[2]
 j=R[i]-R[3]
 if f>k or g>k or h>k or j>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())

R=[a,b,c,d,e,k]

for i in range(4):
 d=R[i]-R[0]
 e=R[i]-R[1]
 f=R[i]-R[2]
 g=R[i]-R[3]
 if d>k or e>k or f>k or g>k:
  print(":(")
  exit()
print("Yay!")

Submission status: Wrong Answer

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

if max(data) - min(data) <= 15:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if abs(l[0]-l[4]) >= k:       
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
a = []
for i in range(6):
  a.append(int(input()))
for i in range(5):
  for j in range(5):
    if abs(a[i] - a[j]) > a[5]:
      print('Yay!')
      sys.exit()
print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

maxima = values[4] - values[0]

if maxima < k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

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

k = int(input())

ret = 'Yay!'
for i in range(4):
    for j in range(i+1, 4):
        if inputList[j] - inputList[i] > k:
            ret = ':('
            break
print(ret)

Submission status: Wrong Answer

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

num.sort()

result = int((N-1)/num[0])+5

print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

flag = "Yay!"
for i in range(len(li)-1):
    if li[i+1] - li[i] > li[5]:
        flag = ":("

print(flag)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
print('Yay!' if all(a[i+1] - a[i] <= k for i in range(4)) else ':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,a,b,c,d,e=[int(input()) for i in range(6)]
dist=[n,0,0,0,0,0]
move=[a,b,c,d,e,0]
t=0
while dist[5]<n:
  dist_t=[max(0,dist[0]-move[0])]
  for j in range(1,6):
    dist_t.append(max(0,dist[j]-move[j])+min(dist[j-1],move[j-1]))
  t=t+1
  dist=dist_t
print(t)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
order = [int(input()) for i in range(5)]
diff = (sorted(map(lambda x: (x % 10), order)))
diff = [i for i in diff if i != 0]

sum_order = sum(list(map(lambda x: -(-x //10), order))) * 10

if diff != []:
    sum_order += diff[0]
    
print (sum_order)

Submission status: Wrong Answer

Solution code:
order = [int(input()) for i in range(5)]
order = list(map(lambda x: -(-x //10), order))
sum_order = sum(order)

diff = (sorted(map(lambda x: (x % 10), order)))
diff = [i for i in diff if i != 0]

print ((sum_order * 10) - 10 + diff[0])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main() -> None:
    num = [int(input()) for _ in range(5)]
    k = int(input())
    if max(num) - min(num) < k:
        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())

def diff(x, y, z = k):
  if abs(x - y) > z:
    return 1
  else:
    return 0
  
num = 0

num += diff(a, e)
num += diff(a, d)
num += diff(a, c)
num += diff(a, b) 
num += diff(b, e)
num += diff(b, d)
num += diff(b, c)
num += diff(c, e)
num += diff(c, d)
num += diff(d, e)

if num > 0:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

r = True
for i in range(4) :
    if A[i+1] - A[i] > k:
         r = False

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

Submission status: Wrong Answer

Solution code:
n = 5;
a = [int(input()) for i in range(n)];
last = 9;
time = 0;
flag = True;

for i in a:
	if last % 10  > i % 10 >= 1:
		time += last  // 10 * 10 + 10;
		last = i;
		flag = False;

	elif i % 10 == 0:
		time += i;

 	else:
		time += i  // 10 * 10 + 10;

if flag:
	print(time + last - 9);

else:	
	print(time + last - 10);

Submission status: Wrong Answer

Solution code:
n = 5;
a = [int(input()) for i in range(n)];
last = 9;
time = 0;

for i in a:
	if last % 10  > i % 10 >= 1:
		time += last  // 10 * 10 + 10;
		last = i;

	elif i % 10 == 0:
		time += i;

 	else:
		time += i  // 10 * 10 + 10;

if last == 9:
	print(time + last - 9);

else:	
	print(time + last - 10);

Submission status: Wrong Answer

Solution code:
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q
    if mod != 0:
        time += 10
        list2.append(mod)

time = time - 10 + min(list2)
print int(time)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# coding = utf-8
list1 = []

for n in range(6):

    list1.append(int(input()))

count = 0

for city1 in list1[:5]:
    for city2 in list1[:5]:
        if (city1 - city2 > list1[5] or city2 - city1 > list1[5]):
            print ':('
            count += 1
            break
if count == 0:
    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())
ant = [a, b, c, d, e]
f = False

for i in range(0, 5):
    for ii in range(i + 1, 5):
        sa = ant[i] - ant[ii]
        if -sa <= k:
            continue
        else:
            print(":(")
            f = True
            break

if f is False:
    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())
ant = [a, b, c, d, e]
f = False

for i in range(0, 4):
    for ii in range(i + 1, 4):
        sa = ant[i] - ant[ii]
        if -sa <= k:
            continue
        else:
            print(":(")
            f = True
            break

if f is False:
    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())
ant = [a, b, c, d, e]
f = False

for i in range(0, 4):
    for ii in range(i + 1, 4):
        sa = ant[i] - ant[ii]
        if -sa < k:
            continue
        else:
            print(":(")
            f = True
            break

if f is False:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
def ddprint(x):
  if DBG:
    print(x)

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

Submission status: Wrong Answer

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

for i in range(5):
    for j in range(4-i):
        if x[j] - x[i] > x[5]:
            flag += 1
            break

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

arr = []
for i in range(6):
    arr.append(int(input()))
okay = 1
for i in range(0, 4):
    if arr[4] - arr[i] > arr[5]:
        print(":(")
        okay = 0
if okay:
    print("Yay!")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
print(':(' if a[4] - a[0] > k else 'Yey!')

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
a.sort
print(':(' if a[len(a) - 1] - a[0] > k else 'Yey!')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
 
num = [int(input()) for _ in range(5)]
num2 = [n if n % 10 == 0 else n - (n%10) + 10  for n in num]

c = []
for i, j  in enumerate(num):
    n = j
    for k,l in enumerate(num2):
        if  k == i:
            continue
        else:
            n += l
    c.append(n)

print(min(c))

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("Yey!")
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()) for _ in range(5)]
K = int(input())

lenge = 0

for i in range(5):
  for j in range(5):
    if A[i] - A[j] > K:
      lenge += 1
      
if lenge == 0:
  print(":(")
else :
  print("Yay!")

Submission status: Wrong Answer

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

sa = [k > n[i+1] - n[i] for i in range(4)]

print('Yay!' if all(sa) else ':(')

Submission status: Wrong Answer

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

sa = [k >= n[i+1] - n[i] for i in range(4)]

print('Yay!' if all(sa) else ':(')

Submission status: Wrong Answer

Solution code:
Antennas=list()

for i in range(5):
    Antennas.append(input())

k = int(input())

Antennas.sort(reverse = True)
#print(Antennas)

result = int(Antennas[0]) - int(Antennas[4])

if result > k:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
#abc123a

l=[]
for i in xrange(6):
 l.append(int(raw_input()))
k=l[-1]
if l[4]-l[0]>k:
 print ':('
else:
 print 'Yay'

Submission status: Wrong Answer

Solution code:
#abc123a
import sys

l=[]
for i in xrange(6):
 l.append(int(raw_input()))
k=l[-1]
for i in xrange(4):
 for j in xrange(i+1,5):
  if l[j]-l[i]>k:
   print ':('
   sys,exit()
print 'Yay'

Submission status: Wrong Answer

Solution code:
#abc123a
import sys

l=[]
for i in xrange(6):
 l.append(int(raw_input()))
k=l[-1]
m=l[:-1]
if max(m)-min(m)>k:
 print ':('
 sys.exit()
print 'Yay'

Submission status: Wrong Answer

Solution code:
#abc123a
import sys

l=[]
for i in xrange(6):
 l.append(int(raw_input()))
k=l[-1]
for i in xrange(5):
 for j in xrange(i+1,5):
  if l[j]-l[i]>k:
   print ':('
   sys.exit()
print 'Yay'

Submission status: Wrong Answer

Solution code:
#abc123a
import sys

l=[]
for i in xrange(6):
 l.append(int(raw_input()))
print l
k=l[-1]
for i in xrange(5):
 for j in xrange(i+1,5):
  if l[j]-l[i]>k:
   print ':('
   sys.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())
if e-d>=k and e-c>=k and e-b>=k and e-b>=k and e-a>=k and d-c>=k and d-b>=k and d-a>=k and c-b>=k and c-a>=k and b-a>=k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
import sys

args = [int(input()) for i in range(6)]
smallest = 0
i = 0
sum = 0
arg_num = 0

for tmp in args[:5]:
    if tmp % 10 < smallest:
        if tmp %10 != 0:
            smallest = tmp
            arg_num = i
    i+=1

for i in range(5):
    if i != arg_num:
        args[i] = args[i] + 10 - tmp % 10
    sum += args[i]

print(sum)

Submission status: Wrong Answer

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

difs = [b-a, c-b, d-c, e-d]
Mdif = max(difs)
if Mdif <= k:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
import math

A = []
N = int(input())
for i in range(5):
    a = int(input())
    A.append(a)
min_t = min(A)
"""
if N % min_t == 0:
    a = N // min_t
else:
    a = N // min_t + 1
"""
a = math.ceil(N / min_t)
print(a + 5)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python

def main():
    N = int(input())
    d = []
    for _ in range(5):
        d.append(int(input()))
    print(-(-N // min(d)) + 4)


if __name__ == '__main__':
    main

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python

def main():
    dishes = []
    for _ in range(5):
        dishes.append(int(input()))
    _sum = sum([maxtime(d) for d in dishes])
    _sum -= max([remtime(x) for x in dishes])
    print(_sum)
    
def maxtime(num):
    return (num + 9) // 10 * 10

def remtime(num):
    return maxtime(num) - num


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = int(input())
_ = int(input())
_ = int(input())
_ = 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())
_ = int(input())
_ = int(input())
_ = 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())
_ = int(input())
_ = int(input())
_ = int(input())
e = int(input())
k = int(input())

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

Submission status: Wrong Answer

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

list = [a, b, c, d, e]
#print(list)

flag = True

for i in range(5):
    y = list[0]
    list.pop(0)
    #print(list)
    alist = map(lambda x: x - y, list)
    #print(alist)
    if (all([z < k for z in alist])) == False:
        flag = False
        break
    else:
        continue
        break

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

Submission status: Wrong Answer

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

max_a = max(a)
min_a = min(a)
if(abs(max_a - min_a) < k):
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]
print("Yay!" if a[4]-a[0]>a[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 k > e - a :
  print("Yay!")
else :
  print(":(")

Submission status: Wrong Answer

Solution code:
x = [int(input()) for i in range(6)]
i = 0
j = 0
flag = 0
while i <= 5:
    while j <= 5:
        if x[i]-x[j] > x[5]:
            print(":(")
            flag = 1
            break
        j += 1
    i += 1
    j = 0

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

Submission status: Wrong Answer

Solution code:
r=[]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
list = []
indent = 0
for i in range(5):
  memory = 9
  list.append(int(input()))
  if memory > list[i] % 10 and list[i] % 10 > 0:
  	indent = i
 
count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * (int(list[i]/10) + 1)
 
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
list = []
indent = 0
for i in range(5):
  memory = 9
  list.append(int(input()))
  if memory > list[i] % 10:
  	indent = i
 
count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * (int(list[i]/10) + 1)
 
print(count)

Submission status: Wrong Answer

Solution code:
list = []
indent = 0
for i in range(5):
  memory = 0
  list.append(int(input()))
  if memory > list[i] % 10:
  	indent = i
 
count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * (int(list[i]/10) + 1)
 
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(4):
  for j in range(3-i):
    if list[i+1+j] - list[i] > k:
      print(":(")
      break
  else:
    print("Yay!")
  break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

nn=0
for n, i in enumerate(l[::-1][1:]):
    if n==0:
        p = i
    else:
        if p - i > l[-1]:
            print(':(')
            nn+=1
            exit()
if nn==0:
    print('Yay!')

Submission status: Wrong Answer

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

for n, i in enumerate(l[::-1][1:]):
    if n==0:
        p = i
    else:
        if p - i > l[-1]:
            print(':(')
            sys.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())
if e-a < k:
  print("Yay!")
else:
  print(":(")

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())
i = 0

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

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

list3 = [x - y for x in list1 for y in list2]
  	
for j in list3:
	if j > k:
		print("Yay!")
		exit()
		
print(":(")

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())
i = 0

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

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

list3 = []

while True:
  list3 = list3 + [x - y for x in list1 for y in list2]
  i += 1
  if i == 5:
  	break
  	
for j in list3:
	if j > k:
		print("Yay!")
		exit()
		
print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = []
for i in range(5):
    l.append(int(input()))
K = int(input())
for j in range(5):
    for k in range(5-j):
        if abs(l[j] - l[k-1]) == K:
            print(':(')
            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())

lst=[A,B,C,D,E]
neck=min(lst)
if neck==N:
    ans=5
else:
    ans=N//neck+5

print(ans)

Submission status: Wrong Answer

Solution code:
antena = [int(input()) for x in range(5)]
lim = int(input())
boo = True
for i in range(1, 5):
  k = antena[i] - antena[i - 1]
  if k > lim:
    boo = False
if boo:
  print("Yay!")
else:
  print(":(")

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


print(ans)

Submission status: Wrong Answer

Solution code:
0

Submission status: Wrong Answer

Solution code:
inputs = [0] * 6
for i in range(6):
    inputs[i] = int(input())
if inputs[4] - inputs[0] <= inputs[5]:
    print('Yey!')
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())

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

Submission status: Wrong Answer

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

D = True

for i in range(len(spot)):
    for j in range(i+1, len(spot)):
        if j-i > k:
            D = False

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

Submission status: Wrong Answer

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

D = True

for i in range(len(spot)):
    for j in range(i+1, len(spot)):
        if j-i > k:
            D = False

if D:
    print('Yay')
else:
    print(':(')

Submission status: Wrong Answer

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

if max(a[:-1]) - min(a[:-1]) > a[-1]:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
a = list(map(int,[input() for i in range(5)]))
print(":(")

Submission status: Wrong Answer

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

if abs(l[0] - l[4]) < l[5]:
	print("Yay!")
else:
	print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(4):
	for j in range(i+1,5):
		if not abs(l[i] - l[j]) < l[5]:
			flag = 1
			break

if not flag == 1:
	print("Yay!")
else:
	print(":(")

Submission status: Wrong Answer

Solution code:
l = []
flag = 0
for i in range(6):
	l.append(int(input()))
print(l)

for i in range(4):
	for j in range(i+1,5):
		if not abs(l[i] - l[j]) < l[5]:
			flag = 1
			break

if not flag == 1:
	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('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('Yay!')
else:
	print(':(')

Submission status: Wrong Answer

Solution code:
import itertools
dishes=[int(input()) for i in range(5)]
all_comb=list(itertools.permutations(dishes))
t_min=123*50
for comb in all_comb:
  t=0
  for i in range(4):
    t=int((t+comb[i]-1)/10)*10+10
  t=t+comb[4]
  if t < t_min:
    t_min=t
print(t_min)

Submission status: Wrong Answer

Solution code:

n = int(input())
li = []
for i in range(5):
    li.append(int(input()))
m = min(li)
if n % m != 0:
    t = n // m
else:
    t = n // m - 1

print(t + 5)

Submission status: Wrong Answer

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

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

l = [a, b, c, d, e]
l_times_ten = []
amari_list = []
time = 0
for i in range(len(l)):
    amari = l[i] % 10
    if amari == 0:
        l_times_ten.append(l[i])
    elif amari != 0:
        amari_list.append(amari)
        l_tmp =  l[i] +(10 - amari)
        l_times_ten.append(l_tmp)
max_total_time = sum(l_times_ten)
adding = 10 - min(amari_list)
min_total_time = max_total_time - adding
print(min_total_time)

Submission status: Wrong Answer

Solution code:
B = [int(input()) for _ in range(5)]
A = [10-int(str(B[i])[-1]) for i in range(5) if str(B[i])[-1] != "0"]
if len(A) != 0:
	A.remove(max(A))
print(sum(B)+sum(A))

Submission status: Wrong Answer

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

l = [a, b, c, d, e]
l_times_ten = []
amari_list = []
time = 0
for i in range(len(l)):
    amari = l[i] % 10
    amari_list.append(amari)
    if amari == 0:
        l_times_ten.append(l[i])
    elif amari != 0:
        l_tmp =  l[i] +(10 - amari)
        l_times_ten.append(l_tmp)
max_total_time = sum(l_times_ten)
min_total_time = max_total_time - (10 - max(amari_list))
print(min_total_time)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

if (args[4] - args[0]) > args[5]:
    print(":(")
print("Yay!")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr  6 22:12:01 2019

@author: qqwx2_000
"""
#マックスから引くやり方
import numpy as np
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
# 届く時間を1の位で切り上げたとき、届く時間の和
Menu = [A,B,C,D,E]
L1=[0]
L2=[]
time_max=0
extra=[]
"""
解答1
"""
for i in Menu:
    if i%10==0:
        L1.append(i)
    else:
        L2.append(i + 10 - int(i%10))
        extra.append(i%10)
tmp = 10 - min(extra)
time_max=sum(L1)+sum(L2)
print(time_max-tmp)



"""
解答２

time_max = sum(map(lambda x: (x + 9) // 10 * 10, Menu))
# 1の位で切り上げたとき、最も元の時間との差が大きいもの

tmp = max(map(lambda x: (x + 9) // 10 * 10 - x, Menu))
print(time_max - tmp)
"""

Submission status: Wrong Answer

Solution code:
N,A,B,C,D,E=[int(input()) for i in range(6)]
a,b,c,d,e,f,T=[N,0,0,0,0,0,0]


def ship(station,destination,capacity):
    if station>=capacity:
        s=capacity
    else:
        s=station
    destination=destination+s
    station=station-s
    return station,destination

while True:
    if f==N:
        print(T)
        break
    if e!=0:
      e,f=ship(e,f,E)
    if d!=0:
      d,e=ship(d,e,D)
    if c!=0:
      c,d=ship(c,d,C)
    if b!=0:
      b,c=ship(b,c,B)
    if a!=0:
      a,b=ship(a,b,A)
    T=T+1