TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
seq = (a,b,c,d,e,f)
data = list(itertools.combinations(seq,2))
result = 0
for i in range(len(data)):
    if data[i][0] - data[i][1] < k:
        result +=1
if result == len(data):
    print('Yay!')
else:
    print(':(')




import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
seq = (a,b,c,d,e)
data = list(itertools.combinations(seq,2))
print(data)
result = 0
for i in range(len(data)):
    if data[i][0] < data[i][1]:
        if data[i][1] - data[i][0] < k:
        result +=1
    else:
        if data[i][0] - data[i][1] < k:
        result +=1
if result == len(data):
    print('Yay!')
else:
    print(':(')




import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
seq = (a,b,c,d,e)
data = list(itertools.combinations(seq,2))
print(data)
result = 0
for i in range(len(data)):
    if data[i][0] < data[i][1]:
        if data[i][1] - data[i][0] < k:
            result +=1
    else:
        if data[i][0] - data[i][1] < k:
            result +=1
if result == len(data):
    print('Yay!')
else:
    print(':(')


import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
seq = (a,b,c,d,e)
data = list(itertools.combinations(seq,2))
print(len(data))
result = 0
for i in range(len(data)):
    if data[i][0] - data[i][1] <= k:
        result +=1
if result == len(data):
    print('Yay!')
else:
    print(':(')




import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
seq = (a,b,c,d,e)
data = list(itertools.combinations(seq,2))
print(data)
result = 0
for i in range(len(data)):
    if data[i][0] < data[i][1]:
        if data[i][1] - data[i][0] < k:
            result +=1
    else:
        if data[i][0] - data[i][1] < k:
            result +=1
if result == len(data):
    print('Yay!')
else:
    print(':(')




import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
seq = (a,b,c,d,e)
data = list(itertools.combinations(seq,2))
result = 0
for i in range(len(data)):
    if data[i][0] < data[i][1]:
        if data[i][1] - data[i][0] <= k:
            result +=1
    else:
        if data[i][0] - data[i][1] <= k:
            result +=1
if result == len(data):
    print('Yay!')
else:
    print(':(')


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
inputs=input()
print(input)

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

inputs=[int(i) for i in input().split()]
k=inputs[-1]
for i in range(5):
  for j in range(5-i):
    if abs(j-i)>k
    print(":(")
 		return

print("Yay!")
return
    




inputs=[int(i) for i in input().split()]
k=inputs[-1]
for i in range(5):
  for j in range(5-i):
    if abs(j-i)>k
    print(":(")
 	return

print("Yay!")
return
    




inputs=[int(i) for i in input().split()]
k=inputs[-1]
for i in range(5):
  for j in range(5-i):
    if abs(inputs[j]-inputs[i])>k
    print(":(")
 	return

print("Yay!")
return
    




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

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)
    print("{}{}{}{}{}{}".format(a,b,c,d,e,f))
    T=T+1

inputs=[int(input()) for i in range(6)]
k=inputs[-1]
T=False
for i in range(5):
  for j in range(5-i):
    if abs(inputs[5-j]-inputs[i-1])>k:
      print(":(")
      quit()

print("Yay!")


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x, y, z, k = map(int, input().split())
m = []
for _ in range(3):
    m.append(sorted(list(map(int, input().split())), reverse=True))
 
def sorted_sum(list_a, list_b):
    s = []
    for x in list_a:
        for y in list_b:
            s.append(x + y)
    return sorted(s, reverse=True)
 
ans = sorted_sum(sorted_sum(m[0], m[1])[0:k], m[2])[0:k]
for i in range(0, k):
    print(ans[i])

x, y, z, k = map(int, input().split())
m = []
for _ in range(3):
    m.append(sorted(list(map(int, input().split())), reverse=True))
 
def sorted_sum(list_a, list_b):
    s = []
    for x in list_a:
        for y in list_b:
            s.append(x + y)
    return sorted(s, reverse=True)
 
ans = sorted_sum(sorted_sum(m[0], m[1])[0:k], m[2])
for i in range(0, k):
    print(ans[i])

def check(pos):
    for a in pos:
        for b in pos:
            if abs(a - b) > k:
                return False
    return True

pos = [None] * 5
for i in range(0, 5):
    pos[i] = int(input())
k = int(input())

print("Yay!" if check(pos) else ":(")



Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = []
for i in range(5):
  a.append(int(input()))
k = int(input())

ans = "Yay!"
for i in range(4):
  for j in range(i+1, 5):
  	if a[i] - a[j] > k:
    	ans = ":("
    
print(ans)

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
trans=[int(input()) for i in range(5)]
d=min(trans)

if n%d == 0:
    print(n//d +4)
else:
    print((n//d +1) +4) 

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

flag=0
for i in range(4):
    for j in range(i+1, 5):
        d=a[j]-a[i]
        if d > k:
            flag=1

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=[]
for i in range(5):
  n[i]=int(input())
k=int(input())
mi=min(n)
ma=max(n)
if k <= ma-mi:
  print("Yay!")
else:
  print(":(")

        

n=[0]*5
for i in range(5):
  n[i]=int(input())
k=int(input())
mi=min(n)
ma=max(n)
if k >=ma-mi:
  print("Yay!")
else:
  print(":(")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-k > k:
  print(':(')
else:
  print('Yay')

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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

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

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

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

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

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

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
ls = []
for i in range(5):
    ls.append(int(input()))
k = int(input())
if ls[4]-ls[0] <= k:
    print('Yay!')
else:
    print(':(')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
xs = [for i in range[5]]
k = int(input())
if (xs[4] - xs[0] <= k):
	print("Yay!")
else:
	print(":(")


xs = [for i in range[5]]
k = int(input())
if (xs[4] - xs[0] <= k):
	print("YES")
else:
	print("NO")

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


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
l=[]
for i in range(5):
    l.append(i)
k=int(input())

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



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

k=int(input())

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



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = list(int(input()) for _  in range(5))
k = int(input())
ans='Yay!'
for i in a:
  for j in len(a):
    if a[j] - i >18:
      ans = ':('
print(ans)

a = list(int(input()) for _  in range(5))
k = int(input())
ans='Yay!'
for i in a:
  for j in len(a):
    if a[j] - i >k:
      ans = ':('
print(ans)


a = list(int(input()) for _  in range(5))
k = int(input())
ans='Yay!'
for i in a:
  for j in range(len(a)):
    if a[j] - i >k:
      ans = ':('
print(ans)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
lst = []
for i in range(5):
    lst.append(int(input()))
lst_f=[]
for i in range(5):
    lst_f.append(lst[i]%10)
while 0 in lst_f:
    lst_f.remove(0)
if len(lst_f) == 0:
    print(sum(lst))
else:
    print(sum(lst)-sum(lst_f)+10*(len(lst_f)-1)+min(lst_f))

a = int(input().split())
b = int(input().split())
c = int(input().split())
d = int(input().split())
e = int(input().split())
k = int(input().split())
if (e-a)>k:
    print(":(")
else:
    print("Yay!")

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
xs = []
for x in range(5):
   xs.append(int(input()))
k = int(input())
if max(xs) - min(xs) > k:
    print(":(")
else:
    print("Yay")


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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a=[int(input()) for i in range(5)]
k=int(input())
x=max(a)-min(a)
if x>=k:
  print('Yay!')
else:
  print(':(')

a=int(print())
b=int(print())
c=int(print())
d=int(print())
e=int(print())
k=int(print())

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

else:
  print(':(')

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

x=[a,b,c,d,e]
y=max(x)-min(x)

if y>=k:
  print('Yay!')
else:
  print(':(')

a=int(print())
b=int(print())
c=int(print())
d=int(print())
e=int(print())
k=int(print())

x=[a,b,c,d,e]
y=max(x)-min(x)

if y>k:
  print(':(')
else:
  print('Yay!')


a=int(print())
b=int(print())
c=int(print())
d=int(print())
e=int(print())
k=int(print())

x=[a,b,c,d,e]
y=max(x)-min(x)

if y>k:
  print(':(')
if y<=k:
  print('Yay!')


a=int(print())
b=int(print())
c=int(print())
d=int(print())
e=int(print())
k=int(print())

x=[a,b,c,d,e]
y=max(x)-min(x)

if y>=k:
  print('Yay!')
else:
  print(':(')


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


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = sorted(list(map(int, [input() for i in range(5)])))
k = int(input())
if (a[4] - a[0]) <= k:
  print('Yap!')
else:
  print(':(')

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
A=[int(input()) for i in range(5)]
K = int(input())

if(A[-1] - A[0] <= K):
  print("Yay!")
 else:
  print(":(")



A=[int(input()) for i in range(5)]
K = int(input())

if(A[-1] - A[0] <= K):
  print("Yay!")
else:
  print(":(")


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
l = []
for i in range(5):
    l.append(int(input()))
k = int(input())
flg = True

for i in range(5):
    print("i: "+str(i))
    for j in range(i, 5):
        print("j: "+str(j))
        if l[j] - l[i] >k:
            flg = False
            break
if flg==True:
    print("Yay!")
else:
    print(":(")

"""
0 1234
1 234
2 34
3 4
"""

import sys

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

for i in range(5):
    # print("------------------")
    # print("i: "+str(i))
    for j in range(i+1, 5):
        
        if l[j] - l[i] > k:
            print(":(")
            sys.exit()
print("Yay!")

"""
0 1234
1 234
2 34
3 4
"""

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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))


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)


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


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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import numpy as np
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

A = a % 10
B = b % 10
C = c % 10
D = d % 10
E = e % 10

S = []
sum = 0
if A != 0:
  S.append(A)
if B != 0:
  S.append(B)
if C != 0:
  S.append(C)
if D != 0:
  S.append(D)
if E != 0:
  S.append(E)
if len(S) == 0:
  sum = a + b + c + d + e
else:
  sum = (a //10 + b //10 + c //10 + d //10 + e //10)*10 + 10*(len(S) - 1) +min(S)
print(sum)


import numpy as np
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

A = a % 10
B = b % 10
C = c % 10
D = d % 10
E = e % 10

S = []
sum = 0
if A != 0:
  S.append(A)
if B != 0:
  S.append(B)
if C != 0:
  S.append(C)
if D != 0:
  S.append(D)
if E != 0:
  S.append(E)
if len(S) == 0:
  sum = a + b + c + d + e
else:
  sum = (a //10 + b //10 + c //10 + d //10 + e //10)*10 + 10*(len(A) - 1) +min(S)
print(sum)


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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
for i in range(6):
    a.append(int(input()))

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

a = []

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

if a[0] <= a[1]:
    sum_minute = 1
else:
    sum_minute = -(-a[0] // a[1])

b = []
for i in range(5):
    b.append(a[i+1])

min_in = b.index(min(b)) + 1
min_in = min(min_in , 2)


for i in range(2,min_in):
    if a[i - 1] <= a[i]:
        m = 1
    else:
        m = -(-(a[0] - (sum_minute - i + 1) * a[i]) // a[i])
    sum_minute += m

for i in range(min_in, 6):
    sum_minute += 1

print(sum_minute)

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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 ":(")

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a, b, c, d, e, k = map(int, input().split())

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

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


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

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



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


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


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



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


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


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
A=[0]*6
for i in range(6):
  A[i]=int(input())
for i in range(5):
  for j in range(5):
    if A[i]-A[j]>A[6]:
      print(':(')
      exit()
print('Yay!')

A=[0]*6
for i in range(6):
  A[i]=int(input())
for i in range(5):
  for j in range(5):
    if A[i]-A[j]>A[5]:
      print(':(')
      exit()
print('Yay!')


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
flag = -1
pos = [a, b, c, d, e]
for i in pos:
    for j in pos:
        if abs(i-j) > k:
            flag = 1
        else:
            pass

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n,*a=map(int,open(0).read().split())
b=min(a)
if b<n:
    print(n//b+(n%b>0)-1+5)
else:
    print(5)

x,y,z,k=map(int,input().split())
a=tuple(map(int,input().split()))
b=tuple(map(int,input().split()))
c=tuple(map(int,input().split()))
 
def f(p,q):
    return sorted([i+j for j in q for i in p])[::-1][:k]
 
if x+y<y+z:
    for i in sorted(f(c,f(a,b)))[::-1][:k]:
        print(i)
elif x+z<y+z:
    for i in sorted(f(b,f(a,c)))[::-1][:k]:
        print(i)
else:
    for i in sorted(f(a,f(b,c)))[::-1][:k]:
        print(i)

from itertools import*
x,y,z,k=map(int,input().split())
a=map(int,input().split())
b=map(int,input().split())
c=map(int,input().split())
#print(a,b,c)
for e in sorted(sum(i)for i in product(a,b,c))[::-1][:k]:
    print(e)

X, Y, Z, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ab=sorted(s+t for t in B for s in A)[-1:-K-1:-1]
abc=sorted(i+x for i in ab for x in C)[-1:-K-1:-1]
print(*abc,sep="\n")X, Y, Z, K = map(int, input().split())


from itertools import*
a,b,c,d,e,k=map(int,open(0).read().split())
x=[a,b,c,d,e]
for i in combinations(x,2):
    p,q=list(i)
    if abs(p-q)>k:
        print(":(")
        exit()
print("Yay!")

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
antenna = [int(input()) for _ in range(5)]
k = int(input())
 
for i in range(len(antenna)):
  for j in range(len(antenna)):
    if abs(antenna[i]-antenna[j])<=k:
      print("Yay!")
    else:
      print(":(")

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

for i in range(len(antenna)):
  for j in range(len(antenna)):
    if abs(antenna[i]-antenna[j])<=k:
      print("Yey!")
    else:
      print(":(")

import sys
antenna = [int(input()) for _ in range(5)]
k = int(input())
 
for i in range(len(antenna)):
  for j in range(len(antenna)):
    if antenna[i]-antenna[j]>k:
      print(":(")
      sys.exit()
print("Yay!")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
 
max_diff = max([a, b, c, d, e]) - min([a, b, c, d, e])
ans = "Yay!"
if(max_diff > k):
    ans = ":("


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
 
max_diff = max([a, b, c, d, e]) - min([a, b, c, d, e])
ans = "Yay!"
if(max_diff > k):
    ans = ":("
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a=[int(input()) for _ in range(5)]
b=[]
ans=0
for j in a:
  while j%10!=0:
    j+=1
  b.append(j)
for i in range(5):
  if b[i]-a[i]>ans:
    ans=b[i]-a[i]
    
print(sum(b)-ans)

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


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

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


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x = []
for i in range(6):
    x.append(int(input()))
if x[5] >= (max(x[:5])-min(x[:5])):
    print("Yay")
else:
    print(";(")


x = []
for i in range(6):
    x.append(int(input()))
print(x)
if x[5] >= (max(x[:5])-min(x[:5])):
    print("Yay")
else:
    print(";(")

x = []
for i in range(6):
    x.append(int(input()))
print(x)
if x[5] > (max(x[:5])-min(x[:5])):
    print("Yay")
else:
    print(";(")

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a=[int(input()) for i in range(6)]
if a[4]-a[0]>=a[5]:
  print'Yay!'
  else print ':('

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

l = [a,b,c,d,e]
l2 = sorted(l)

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


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

l = [a,b,c,d,e]
l2 = sorted(l)
print(l2)
if k >= l2[4]-l2[0]:
    print('Yay!')
else:
    print(':(')


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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
nums=[]
for i in range(6):
  nums.append(int(input()))
s = "Yay!"
for i in nums:
  if abs(i - nums[i:]):
    s = ":("
print(s)

  

for i in range(6):
  nums[i] = int(input())
s = "Yay!"
for i in nums:
  if abs(i - nums[i:]):
    s = ":("
print(s)

  

nums=[]
for i in range(6):
  nums.append(int(input()))
s = "Yay!"
for i in nums:
  if abs(i - nums[i:-1]) > nums[-1]:
    s = ":("
print(s)

nums = []
for i in range(5):
    nums.append(int(input()))
k = int(input())
s = "Yay!"
for i in range(5):
    for m in range(5 - i):
        a = nums[i]
        if abs(a - nums[m]) > k:
             s = ":("
             break
print(s)



Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
usrInput = []
for n in range(6):
  usrInput.append(int(input()))
 
for l in range(5):
  for m in range(5):
    if abs(int(usrInput[l])-int(usrInput[m])) > usrInput[5]:
      flag = True
 
if flag:
  print(":(")
else:
  print("Yay!")

usrInput = {}
for n in range(6):
  append.usrInput = input()

for l in range(5):
  for m in range(5):
    if abs(int(usrInput[l])-int(usrInput[m])) > usrInput[6]:
      flag = True

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

usrInput = []
flag = False
for n in range(6):
    usrInput.append(int(input()))

for l in range(5):
    for m in range(5):
        if abs(int(usrInput[l]) - int(usrInput[m])) > usrInput[5]:
            flag = True

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
max = 0
min = 999999999
for i in range(5):
    t = int(input())
    if max < t:
        max = t
    if min > t:
        min = t

k = int(input())

print(max, min, k)
if max - min < k:
    print("Yay!")
else:
    print(":(")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
num = []

for k in range(5):
  num.append(int(input()))

k = int(input())

for i in range(4,0,-1):
  for j in range(i):
    if (num[i] - num[j]) > k:
      print(":(")
    else:
      print("Yay!")

num = []

for k in range(5):
  num.append(int(input()))

k = int(input())

bool = True

for i in range(4,0,-1):
  for j in range(i):
    if (num[i] - num[j]) > k:
      bool = False
    else:
      continue
    break
    
if bool:
  print("Yay!")
else:
  print(":(")

Verdicts: Wrong Answer

Accepted