ZhenlongDai/ACPR huggingface dataset:
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
print(x)
a = 0
b = 0
for i in range(1000):
  for j in range(-500, 500):
    if i**5 - j**5 == x:
      a = i
      b = j
      break

print(a, b)      

Failing test case input:
244

Expected output:
1 -3


Actual output:
244
3 -1


Fixed submission (verdict: Accepted):
import sys

x = int(input())

for a in range(500):
  for b in range(-500, 500):
    if a**5 - b**5 == x:
      print(a, b)
      sys.exit(0)

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = int(input())

for a in range(-100,101) :
    powa = pow(a,5)
    for b in range(-100,101) :
        powb = pow(b,5)
        if (powa + powb == X) :
            print(a,b)
            exit()
        

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3


Fixed submission (verdict: Accepted):
X = int(input())

for a in range(-1000,1001) :
    powa = pow(a,5)
    for b in range(-1000,1001) :
        powb = pow(b,5)
        
        if (powa - powb == X) :
            print(a,b)
            exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
def make_divisors(n):
    divisors = [0]
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
    return divisors

flag = 0
a_s = 0
if x == 1:
  print(1, 0)
else:
  l = make_divisors(x)
  print(l)
  for i in range(x+1):
    if 2*(i**5) >= x:
      a_s = i
      break
  for a in range(a_s, x+1):
    if flag == 1:
      break
    for b_a in l:
      if b_a <= a:
        b = a - b_a
        if a**5 - b**5 == x:
          print(a, b)
          flag += 1
          break
        elif a**5 + b**5 == x:
          print(a, -1*b)
          flag += 1
          break
      else:
        continue

Failing test case input:
244

Expected output:
1 -3


Actual output:
[0, 1, 2, 4]
3 -1


Fixed submission (verdict: Accepted):
x = int(input())
def make_divisors(n):
    divisors = [0]
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
    return divisors

flag = 0
a_s = 0
if x == 1:
  print(1, 0)
else:
  l = make_divisors(x)
  for a in range(a_s, x+1):
    if flag == 1:
      break
    for b_a in l:
      if b_a <= a:
        b = a - b_a
        if a**5 - b**5 == x or a**5 + b**5 == x:
          flag += 1
          print(a, b)
          break
      if b_a > a:
        b = b_a - a
        if a**5 + b**5 == x:
          flag += 1
          print(a, -b)
          break

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

p = 0
while True:
    p += 1
    for i in range(-p,p):
        for j in range(-p,p):

            if i**5 + j**5 == x:
                print (i,j)
                exit ()


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3


Fixed submission (verdict: Accepted):
x = int(input())

p = 0
while True:
    p += 1
    for i in range(-p,p):
        for j in range(-p,p):
            if i**5 - j**5 == x:
                print (i,j)
                exit ()
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
arr = []
for i in range(1,int(pow(n,1/2))+1):
  if n % i == 0:
    arr.append(i)
res = []
for i in range(len(arr)):
  for j in range(-arr[i]-1,int(pow(n,1/2)+1)):
    if (j + arr[i])**5 - j**5 == n:
      res = [j,j+arr[i]]
      break
print(*res)

Failing test case input:
244

Expected output:
1 -3


Actual output:
-3 1


Fixed submission (verdict: Accepted):
n = int(input())
arr = []
for i in range(1,int(pow(n,1/2))+1):
  if n % i == 0:
    arr.append(i)
res = []
for i in range(len(arr)):
  for j in range(-arr[i]-1,int(pow(n,1/2)+1)):
    if (j + arr[i])**5 - j**5 == n:
      res = [j+arr[i],j]
      break
print(*res)

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

X = int(input())


a, b = 0, 0

nl = []
i = 0
n = i**5
while n <= 10**9:
    nl.append(n)
    i += 1
    n = i**5

ai = 0
for i, n in enumerate(nl):
    if n > X:
        ai = i-1
        break

for i in range(ai, -1, -1):
    t = X-nl[i]
    if t in nl:
        a = i
        b = -(nl.index(X-nl[i]))
        break

    if -t in nl:
        a = i
        b = nl.index(X-nl[i])
        break


print("{} {}".format(a, b))


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):

X = int(input())


a, b = 0, 0

nl = []
i = 0
np = 0
n = i**5
while n - np <= 10**9:
    nl.append(n)
    i += 1
    np = n
    n = i**5

for i in range(len(nl)):
    t = X-nl[i]
    if t in nl:
        a = i
        b = -(nl.index(t))
        break

    if -t in nl:
        a = i
        b = nl.index(-t)
        break


print("{} {}".format(a, b))

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

for a in range(-118,120):
    if a**5 - (a-1)**5 == x:
        print(a, a-1)
        break


Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
x = int(input())

for a in range(-118,120):
    for b in range(-118,120):
        if a**5 - b**5 == x:
            print(a, b)
            exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

lower = -1
upper = -1
for i in range(0, 1000):
    pow5 = pow(i, 5)
    if lower == -1 and pow5 >= x:
        lower = i - 1

    if upper == -1 and pow5 - pow(i-1, 5) >= x:
        upper = i
        break

for a in range(lower, upper+1):
    a5 = pow(a, 5)
    for b in range(-1000, a):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)

print("no")


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x = int(input())

lower = -1
upper = -1
for i in range(100000000):
    pow5 = pow(i, 5)
    if lower == -1 and pow5 >= x:
        lower = i - 1
        break

for i in range(lower, 100000000):
    pow5 = pow(i, 5)
    if upper == -1 and pow5 - pow(i-1, 5) >= x:
        upper = i
        break

for a in range(-upper-1, upper+1):
    a5 = pow(a, 5)
    for b in range(-upper-1, upper+1):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)


print(0, 0)
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = int(input())








isOK = False
for a in range(-120,120):
  for b in range(-120,120):
    if a*a-b*b == X:
      print(a,b)
      isOK = True
      break
  if isOK:break


Failing test case input:
244

Expected output:
1 -3


Actual output:
-62 -60


Fixed submission (verdict: Accepted):
import sys
X = int(input())







    
for a in range(-120,120):
  for b in range(-120,120):
    if a**5-b**5 == X:
      print(a,b)
      sys.exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(200):
  for j in range(-200,200):
    if(i**5+j**5==x):
      print(i,j)
      break
      
    

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3
3 1


Fixed submission (verdict: Accepted):
x = int(input())
judge = 0
for i in range(-200,200):
  for j in range(-200,200):
    if(i**5-j**5==x):
      print(i,j)
      judge += 1
      break
  if(judge == 1):
    break

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):

x = int(input())
for i in range(-10,10):
    for j in range(-10,10):
        if i**5 - j**5 - x == 0:
            print(i,j)
            break

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):

x = int(input())
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if i**5 - j**5 == x:
            print(i,j)
            quit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(-120,120):
    for j in range(-120,120):
        if i^5 - j^5 == x:
            print(i,j)
            exit()

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
x = int(input())
for i in range(-120,120):
    for j in range(-120,120):
        if i**5 - j**5 == x:
            print(i,j)
            exit()

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    X = int(input())
    for a in range(-120, 120):
        a5 = a ** 5
        for b in range(-120, 120):
            if a5 + b ** 5 == X:
                print(a, b)
                exit()

if __name__ == '__main__':
    main()


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3


Fixed submission (verdict: Accepted):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    X = int(input())
    for a in range(-120, 120):
        a5 = a ** 5
        for b in range(-120, 120):
            if a5 - b ** 5 == X:
                print(a, b)
                exit()

if __name__ == '__main__':
    main()
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(-120, 120):
  for j in range(-120, 120):
    if i**5-j**5 == x:
        print(i, j)
        break

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
x = int(input())
for i in range(-120, 120):
    for j in range(-120, 120):
        if i**5+j**5 == x:
            print(i,-j)
            exit(0)

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    X=int(input())
    for x in range(-1000,-1000):
        for y in range(-1000,1000):
            if x**5 - y**5 == X:
                print(x,y)
                exit()

main()

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
def main():
    X=int(input())
    for A in range(-1000,1000):
        for B in range(-1000,1000):
            if A**5-B**5==X:
                print(A,B)
                exit()

main()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=int(input())
D=[1]
for i in range(2,int(x**0.5)+1):
    if x%i==0:
        D.append(i)
for d in D:
    for i in range(-100,100):
        if i**5-(i-d)**5==x:
            print(i,i-d)
            exit()
        if (i+d)**5-i**5==x:
            print(i,i+d)
            exit()

Failing test case input:
244

Expected output:
1 -3


Actual output:
-3 1


Fixed submission (verdict: Accepted):
x=int(input())
D=[1]
for i in range(2,int(x**0.5)+1):
    if x%i==0:
        D.append(i)
for d in D:
    for i in range(1000):
        if i**5-(i-d)**5==x:
            print(i,i-d)
            exit()

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())

i = 0
tmp = []
while True:
    _tmp = i ** 5
    if _tmp > 10 ** 9:
        break
    else:
        tmp.append(_tmp)
        i += 1

tmpset = set(tmp)

for i in range(len(tmp)):
    if x - tmp[i] in tmpset:
        break

a = i
b5 = x - tmp[i]

for j in range(len(tmp)):
    if tmp[j] == b5:
        break

b = j

a, b = max(a, b), min(a, b)

print(a, -b)


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x = int(input())

i = 0
tmp = []
for i in range(10 ** 5):
    tmp.append([i ** 5, i])
    tmp.append([(-i) ** 5, -i])
    i += 1

tmp.sort()

tmpset = set([t[0] for t in tmp])

for i in range(len(tmp)):
    if x + tmp[i][0] in tmpset:
        break

b = tmp[i][1]
a5 = x + tmp[i][0]

for j in range(len(tmp)):
    if tmp[j][0] == a5:
        break

a = tmp[j][1]

print(a, b)
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
def factorial(x):
    for a in range(-1, 100):
        for b in range(-1, 100):
            check = math.pow(a, 5) - math.pow(b, 5)
            if check == x:
                return f'{a} {b}'
x = int(input())
print(factorial(x))



Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
import math
def factorial(x):
    max_num = int(2 * (10 ** 9) ** (1 / 5))
    for a in range(-1 * max_num, max_num):
        for b in range(-1 * max_num, max_num):
            check = math.pow(a, 5) - math.pow(b, 5)
            if check == x:
                return f'{a} {b}'


x = int(input())
print(factorial(x))

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys

X = int(input())
a = [i for i in range(101)]
b = [i for i in range(-1, 100)]

for i in a:
    for k in b:
        if i**5 == X + k**5:
            print(i,k)
            sys.exit()

Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):

import sys

X = int(input())
a = [i for i in range(-119, 120)]
b = [i for i in range(-119, 120)]

for i in a:
    for k in b:
        if i**5 == X + k**5:
            print(i,k)
            sys.exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X =int(input())
A =[i**5 for i in range(1,121)]
a =[i for i in range(1,120)]
B =[i**5 for i in range(-120,121)]
b =[i for i in range(-120,121)]

for i in range(len(A)):
    for j in range(len(B)):
        if A[i]  -  B[j]  == X:
            print("{} {}".format(a[i],b[j]))
            break

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
X =int(input())
A =[i**5 for i in range(1,121)]
a =[i for i in range(1,120)]
B =[i**5 for i in range(-120,121)]
b =[i for i in range(-120,121)]

flg =False
for i in range(len(A)):
    for j in range(len(B)):
        if A[i]  -  B[j]  == X:
            print("{} {}".format(a[i],b[j]))
            flg =True
            break
    if flg:
        break

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
k = 1
for i in range(2,x+1):
    if x % i == 0:
        k = i
        break

for a in range(x):
    b = a - k
    if a**5 - b**5 == x:
        print(a, b)
        break

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
x = int(input())

for a in range(-121, 121):
    for b in range(-121,121):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            exit()
Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import math
X=int(input())
a=pow(10,9)
c=math.ceil(a**0.3)
answers=[]
for a in range(-c,c+1):
    for b in range(-c,c+1):
        if pow(a,5)-pow(b,5)==X:
            answers.append(a)
            answers.append(b)
            break
print(answers)


Failing test case input:
244

Expected output:
1 -3


Actual output:
[1, -3, 3, -1]


Fixed submission (verdict: Accepted):
import math
X=int(input())
a=pow(10,9)
c=math.ceil(a**0.3)
answers=[]
for a in range(-c,c+1):
    for b in range(-c,c+1):
        if pow(a,5)-pow(b,5)==X:
            answers.append(a)
            answers.append(b)
            break
print(answers[0],answers[1])

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(400):
  for j in range(400):
    if (i-200)**5-(j-200)*5 == x:
      print(i, j)
      break
  else:
    continue
  break

Failing test case input:
244

Expected output:
1 -3


Actual output:
199 151


Fixed submission (verdict: Accepted):
x = int(input())
for i in range(241):
  for j in range(241):
    if (i-120)**5-(j-120)**5 == x:
      print(i-120, j-120)
      break
  else:
    continue
  break

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def resolve():
    X = int(input())

    for a in range(200):
        for b in range(199):
            if (a**5 - b**5) == X:
                print(a, b)

if __name__ == "__main__":
    resolve()

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
def resolve():
    X = int(input())

    for a in range(200):
        for b in range(-199, 199):
            if (a**5 - b**5) == X:
                print(a, b)
                return

if __name__ == "__main__":
    resolve()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from math import sqrt, log, pow
num = [i**5 for i in range(-1, 121)]
X = int(input())
c = 0
for i in range(len(num)):
    a = num[i]
    for j in range(i+1):
        if a - num[j] == X:
            print(i-1, j-1)
            exit()


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
num = [i**5 for i in range(-121, 121)]
X = int(input())
for i in range(len(num)):
    a = num[i]
    for j in range(i+1):
        if a - num[j] == X:
            print(i-121, j-121)
            exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
x=int(input())
f = math.floor(x ** (1/5)) * 5
for i in range(-f-1,f+1):
    for j in range(-f+1,f+1):
        if i**5-j**5==x:
            print(i,j,sep=" ")

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
import math
x=int(input())
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if i**5-j**5==x:
            print(i,j,sep=" ")
            exit()
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(120):
  for j in range(120):
    if i**5-j**5 == x:
        print(i, j)
    elif i**5+j**5 == x:
        print(i, -j)
    break

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
x = int(input())
for i in range(-120, 120):
    for j in range(-120, 120):
        if i**5+j**5 == x:
            print(i,-j)
            exit(0)

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())

import math

for a in range(1,int(math.sqrt(math.sqrt(x)))+1):
    for b in range(-int(math.sqrt(math.sqrt(x)))+1,int(math.sqrt(math.sqrt(x)))):
        if a!=b:
            if x/(a-b) == a*a*a*a+a*a*a*b+a*a*b*b+a*b*b*b+b*b*b*b:
                print(a,b)
                break


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x = int(input())

import math

for a in range(-int(math.pow(x,1./3.)),int(math.pow(x,1./3.))+1):
    for b in range(-int(math.pow(x,1./3.))+1,int(math.pow(x,1./3.))+1):
        if a!=b:
            if x/(a-b) == a*a*a*a+a*a*a*b+a*a*b*b+a*b*b*b+b*b*b*b:
                print(a,b)
                break
    else:
        continue
    break

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x=int(input())
a=0
b=0
for i in range(0,x):
  for j in range(-i,x):
    if i**5-j**5==x:
      a=i
      b=j
      break
  else:
    continue
  break
print(a,b)

Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x=int(input())
a=0
b=0
for i in range(-500,500):
  for j in range(-500,500):
    if i**5-j**5==x:
      a=i
      b=j
      break
  else:
    continue
  break
print(a,b)

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x=int(input())
for a in range(-500,500,1):
    for b in range(-500,500,1):
        if x==pow(a,5)-pow(b,5):
            print(a,b)


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
x=int(input())
for a in range(-500,500,1):
    for b in range(-500,500,1):
        if x==pow(a,5)-pow(b,5):
            print(a,b)
            exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = int(input())

for i in range(-100,101):
  for j in range(-100,101):
    if i**5+j**5==X:
      print(i,j)
      exit()

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3


Fixed submission (verdict: Accepted):
X = int(input())

for i in range(-1000,1001):
  for j in range(-1000,1001):
    if i**5-j**5==X:
      print(i,j)
      exit()
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

for a in range(-118, 120):
  for b in range(-118, 120):
    if a**5 - b**5 == x:
      print(a, b)
      break


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
x = int(input())

flg = False
for a in range(-118, 120):
  for b in range(-118, 120):
    if a**5 - b**5 == x:
      print(a, b)
      flg = True
      break
  if flg:
    break

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())

for i in range(-120, 120):
    for j in range(-120, 120):
        if i ** 5 - j ** 5 == x:
            print(i, j)


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
x = int(input())

for i in range(-120, 120):
    for j in range(-120, 120):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from itertools import combinations
def main():
    gojo_lst = [i**5 for i in range(-200,200)]
    gojo_dict = {}
    for i in range(-200,200):
        gojo_dict[i**5] = i
    kumiawase = combinations(gojo_lst,2)
    x = int(input())
    for a,b in kumiawase:
        
        if a - b == x or b - a == x:
            print(gojo_dict[a],gojo_dict[b])
            break



if __name__ == '__main__':
    main()


Failing test case input:
244

Expected output:
1 -3


Actual output:
-3 1


Fixed submission (verdict: Accepted):
from itertools import combinations
def main():
    gojo_lst = [i**5 for i in range(-200,200)]
    gojo_dict = {}
    for i in range(-200,200):
        gojo_dict[i**5] = i
    kumiawase = combinations(gojo_lst,2)
    x = int(input())
    for a,b in kumiawase:
        
        if a - b == x:
            print(gojo_dict[a],gojo_dict[b])
            break
        elif b - a == x:
            print(gojo_dict[b],gojo_dict[a])
            break



if __name__ == '__main__':
    main()
Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())
i = 0
while i**5 < x and (i + 1)**5 < x:
    i += 1
tmp1 = i ** 5
rest1 = x - tmp1
j = 0
flag = 0
start, end = 0, rest1
while start <= end:
    middle = (start + end)
    if tmp1 + middle ** 5 > x:
        end = middle - 1
    elif tmp1 + middle ** 5 == x:
        flag = 1
        print(i, -middle)
        break
    else:
        start = middle + 1
if not flag:
    tmp2 = (i+1) ** 5
    rest1 = tmp2 - x
    start, end = 0, rest1
    while start <= end:
        middle = (start + end) 
        if tmp2 - middle ** 5 > x:
            start = middle + 1
        elif tmp2 - middle ** 5 == x:
            flag = 1
            print(i, -middle)
            break
        else:
            end = middle - 1

Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x = int(input())
i = 0
while i**5 < x and (i + 1)**5 < x:
    i += 1
flag = 0
for j in range(x):
    if flag:
        break
    tmp1 = j ** 5
    if tmp1 < x:
        start, end = 0, x - tmp1
        while start <= end:
            middle = (start + end)
            if tmp1 + middle ** 5 > x:
                end = middle - 1
            elif tmp1 + middle ** 5 == x:
                flag = 1
                print(j, -middle)
                break
            else:
                start = middle + 1
    elif tmp1 == x:
        print(j, 0)
        break
    else:
        start, end = 0, tmp1 - x
        while start <= end:
            middle = (start + end) 
            if tmp1 - middle ** 5 > x:
                start = middle + 1
            elif tmp1 - middle ** 5 == x:
                flag = 1
                print(j, middle)
                break
            else:
                end = middle -1

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X=int(input())
for a in range(10**5):
    for b in range(10**5):
        A=a**5
        B=b**5
        tmp1=A+B
        tmp2=-A-B
        tmp3=-A+B
        tmp4=A-B
        if tmp1==X:
            print(a,b)
            break
        elif tmp2==X:
            print(-a,-b)
            break
        elif tmp3==X:
            print(-a,b)
            break
        elif tmp4==X:
            print(a,-b)
            break
    break

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
X=int(input())
stp=0
for a in range(120):
    if stp==1:
        break
    else:
        for b in range(120):
            A=a**5
            B=b**5
            tmp1=A-B
            tmp2=-A+B
            tmp3=-A-B
            tmp4=A+B
            if tmp1==X:
                print(a,b)
                stp=1
                break
            elif tmp2==X:
                print(-a,-b)
                stp=1
                break
            elif tmp3==X:
                print(-a,b)
                stp=1
                break
            elif tmp4==X:
                print(a,-b)
                stp=1
                break
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

from itertools import permutations

def power(base, exp):
  
  if exp < 0:
      return 1 / power(base, -exp)
  ans = 1
  while exp:
      if exp & 1:
          ans *= base
      exp >>= 1
      base *= base
  return ans

def parse():
  return int(input())

def main():
  X = parse()

  A = None
  B = None

  
  
  
  
  

  max_val = 2
  signs = [[1, 1], [-1, 1], [1, -1], [-1, -1]]

  for i in range(0, max_val + 1):
    for j in range(0, max_val + 1):
      for sign in signs:
        
        
        if power(i * sign[0], 5) - power(j * sign[1], 5) == X:
          A = i
          B = j
          break

  print(A, B)

if __name__ == "__main__":
  main()

Failing test case input:
244

Expected output:
1 -3


Actual output:
None None


Fixed submission (verdict: Accepted):

from itertools import permutations

def power(base, exp):
  
  if exp < 0:
      return 1 / power(base, -exp)
  ans = 1
  while exp:
      if exp & 1:
          ans *= base
      exp >>= 1
      base *= base
  return ans

def parse():
  return int(input())

def main():
  X = parse()

  A = None
  B = None

  
  
  
  
  

  max_val = 1000
  signs = [[1, 1], [-1, 1], [1, -1], [-1, -1]]

  for i in range(0, max_val + 1):
    for j in range(0, max_val + 1):
      for sign in signs:
        
        
        if power(i * sign[0], 5) - power(j * sign[1], 5) == X:
          A = i * sign[0]
          B = j * sign[1]
          print(A, B)
          exit(0)
  print(0, 0)

if __name__ == "__main__":
  main()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
import math
f = 1
for A in range(-10**5,10**5):
    A5 = A ** 5
    if x - A5 > 0:
        f = -1
        B = round(math.pow(x - A5,1/5),0)
    else:
        B = round(math.pow(-(x - A5),1/5),0)
    if  A5 == x + B ** 5:
        print(A,int(B)*f)
        quit()


Failing test case input:
244

Expected output:
1 -3


Actual output:
4708 -4708


Fixed submission (verdict: Accepted):
x = int(input())
import math
f = 1
for A in range(-10**5,10**5):
    A5 = A ** 5
    if x - A5 > 0:
        f = -1
        B = round(math.pow(x - A5,1/5),0)
    else:
        B = round(math.pow(-(x - A5),1/5),0)
    if  A5 == x + int(B*f) ** 5:
        print(A,int(B)*f)
        quit()

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
from sys import stdin
input = stdin.readline


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

  for b in range(-500, 500):
    for a in range(-500, 500):
      if a**5 - b**5 == X:
        print(a, b)


if(__name__ == '__main__'):
  main()


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
from sys import stdin
input = stdin.readline


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

  for b in range(-500, 500):
    for a in range(-500, 500):
      if a**5 - b**5 == X:
        print(a, b)
        return


if(__name__ == '__main__'):
  main()
Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x=int(input())
for i in range(-int(abs(x**0.2))-1,int(abs(x**0.2))+1):
    for j in range(-int(abs(x**0.2))-1, int(abs(x**0.2))+1):
        if i**5-j**5==x:
            print(f"{i} {j}")
            break


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
x=int(input())
bf=0

for i in range(-2*int(abs(x**0.2)),2*int(abs(x**0.2))+1):
    for j in range(-2*int(abs(x**0.2)), 2*int(abs(x**0.2))+1):
        if i**5-j**5==x:
            print(f"{i} {j}")
            bf=1
            break
    if bf==1:
        break

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    import sys
    X=int(sys.stdin.readline())
    for i in range(-100,100):
        for j in range(-100,100):
            if i**5-j**5==X:
                print("{} : {} {}".format(X,i,j))
                


main()

Failing test case input:
244

Expected output:
1 -3


Actual output:
244 : 1 -3
244 : 3 -1


Fixed submission (verdict: Accepted):
def main():
    import sys
    X=int(sys.stdin.readline())
    for i in range(-1000,1000):
        for j in range(-1000,1000):
            if i**5-j**5==X:
                print("{} {}".format(i,j))
                return
                


main()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
def main():
    
    x = int(input())
    
    flag = 0
    for a in range(-118, 120, 1):
        for b in range(-119, 119, 1):
            if pow(a,5)-pow(b,5)==x:
                flag = 1
                break
        if flag==1: break

    print([a, b])

main()


Failing test case input:
244

Expected output:
1 -3


Actual output:
[1, -3]


Fixed submission (verdict: Accepted):
import sys
def main():
    
    x = int(input())

    flag = 0
    for a in range(-118, 120, 1):
        for b in range(-119, 119, 1):
            if pow(a,5)-pow(b,5)==x:
                flag = 1
                break
        if flag==1: break

    print(str(a)+" "+str(b))

main()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



flag = 0
X = int(input())
for i in range(1000):
    if flag == 1:
        break
        for j in range(1000):
            a = i-500
            b = j-500
            if X == a**5-b**5:
                print(a, end=" ")
                print(b)
                flag =  1
                break

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):



flag = 0
X = int(input())
for i in range(1000):
    for j in range(1000):
        a = i-500
        b = j-500
        if X == a**5-b**5:
            print(a, end=" ")
            print(b)
            flag =  1
            break
    if flag == 1:
        break
Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
X = int(input())







for a in range(1, 121):
  for b in range(-10000, 120):
    if b**5 == a**5-X:
      print(a, b)
      break



Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
X = int(input())







for a in range(0, 121):
  for b in reversed(range(-122, 120)):
    if b**5 == a**5-X:
      print(a, b)
      exit()
Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 = ":("


Failing test case input:
1
0
4
8
9
15

Expected output:
Yay!


Actual output:

Fixed submission (verdict: Accepted):
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)

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



from itertools import permutations


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

    print('Yay!')


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

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

    k = int(input())

    main(_input, k)


Failing test case input:
1
-2
5
13
10
15

Expected output:
Yay!


Actual output:
:(


Fixed submission (verdict: Accepted):


from itertools import permutations


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

    print('Yay!')


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

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

    k = int(input())

    main(_input, k)

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d,e,k=[int(input()) for _ in range(6)]
if a-e>k:
    print(':(')
else:
    print('Yay!')

Failing test case input:
15
18
26
35
34
2

Expected output:
:(


Actual output:
Yay!


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

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = [int(input()) for i in range(5)]
k = int(input())
ans = 0
for i in range(5):
    for x in range(i,5):
        if A[x] - A[i] > k:
            ans = ans + 1
print(ans)
if ans > 0:
    print(":(")
else:
    print("Yay!")

Failing test case input:
15
0
4
1
38
5

Expected output:
:(


Actual output:
4
:(


Fixed submission (verdict: Accepted):
A = [int(input()) for i in range(5)]
k = int(input())
ans = 0
for i in range(5):
    for x in range(i,5):
        if A[x] - A[i] > k:
            ans = ans + 1
if ans > 0:
    print(":(")
else:
    print("Yay!")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = []
for i in range(5):
    a.append(int(input()))
k = input()

if max(a) - min(a) <= 15:
    print("Yay!")
else:
    print(":(")


Failing test case input:
1
0
7
0
5
3

Expected output:
:(


Actual output:
Yay!


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

if a[4] - a[0] <= k:
    print("Yay!")
else:
    print(":(")
Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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!")

Failing test case input:
1
0
0
13
6
23

Expected output:
Yay!


Actual output:
Yey!


Fixed submission (verdict: Accepted):
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("Yay!")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(':(')

Failing test case input:
15
5
4
71
38
3

Expected output:
:(


Actual output:
Yay


Fixed submission (verdict: Accepted):
a = input()
b = input()
c = input()
d = input()
e = input()
k = input()
if int(e) - int(a) <= int(k):
  print('Yay!')
else:
  print(':(')

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(':(')

Failing test case input:
15
0
1
0
22
5

Expected output:
:(


Actual output:
Yay!


Fixed submission (verdict: Accepted):
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 spot[j] - spot[i] > k:
            D = False

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

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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


Failing test case input:
1
0
7
1
20
2

Expected output:
:(


Actual output:
:()


Fixed submission (verdict: Accepted):

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

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(":(")

Failing test case input:
1
-2
5
13
6
15

Expected output:
Yay!


Actual output:
:(


Fixed submission (verdict: Accepted):
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(":(")
Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input_lines = input().split()
a = int(input_lines[0])
input_lines = input().split()
b = int(input_lines[0])
input_lines = input().split()
c = int(input_lines[0])
input_lines = input().split()
d = int(input_lines[0])
input_lines = input().split()
e = int(input_lines[0])
input_lines = input().split()
k = int(input_lines[0])
if e - a <= k:
    print("Yay!")
else:
    print(":()")


Failing test case input:
1
0
9
0
5
3

Expected output:
:(


Actual output:
:()


Fixed submission (verdict: Accepted):
input_lines = input().split()
a = int(input_lines[0])
input_lines = input().split()
b = int(input_lines[0])
input_lines = input().split()
c = int(input_lines[0])
input_lines = input().split()
d = int(input_lines[0])
input_lines = input().split()
e = int(input_lines[0])
input_lines = input().split()
k = int(input_lines[0])
if e - a <= k:
    print("Yay!")
else:
    print(":(")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if (e-d) <= k and (d-c) <= k and (c-b) <= k and (b-a) <= k:
  print("Yay!")
else:
  print(":(")

Failing test case input:
15
18
26
35
36
18

Expected output:
:(

Actual output:
Yay!


Fixed submission (verdict: Accepted):
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-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(":(")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a < k:
    print(":(")
    exit()
if d - a < k:
    print(":(")
    exit()
if c - a < k:
    print(":(")
    exit()
if b - a < k:
    print(":(")
    exit()

print("Yay!")

Failing test case input:
1
0
7
1
10
23

Expected output:
Yay!


Actual output:
:(


Fixed submission (verdict: Accepted):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a > k:
    print(":(")
    exit()
if d - a > k:
    print(":(")
    exit()
if c - a > k:
    print(":(")
    exit()
if b - a > k:
    print(":(")
    exit()

print("Yay!")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
li = []
for l in range(6):
    li.append(input())

t = 0
s = li.pop()
for i in li:
    for k in li:
        if int(k) - int(i) >= int(s):
            t = 1
        elif int(i) - int(k) >= int(s):
            t = 1

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

Failing test case input:
1
-2
5
13
10
15

Expected output:
Yay!


Actual output:
:(


Fixed submission (verdict: Accepted):
li = []
for l in range(6):
    li.append(input())

t = 0
s = li.pop()
for i in li:
    for k in li:
        if int(k) - int(i) > int(s):
            t = 1
        elif int(i) - int(k) > int(s):
            t = 1

if t == 0:
    print("Yay!")
else:
    print(":(")
Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

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

for i in arr:
    for j in arr:
        if abs(i - j) > k:
            print(":(")
            sys.exit()

print("Yey!")


Failing test case input:
1
-1
5
13
6
15

Expected output:
Yay!


Actual output:
Yey!


Fixed submission (verdict: Accepted):
import sys
 
arr=[int(input()) for i in range(5)]
k=int(input())
 
for i in range(len(arr)):
    for j in range(len(arr)-i-1):
        if abs(arr[i] - arr[i+j+1]) > k:
            print(":(")
            sys.exit()
 
print("Yay!")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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!")

Failing test case input:
1
1
7
1
10
13

Expected output:
Yay!


Actual output:
Yey!


Fixed submission (verdict: Accepted):
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("Yay!")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = []
for i in range(5):
    x.append(int(input()))

k=int(input())

for i in range(len(x) - 1):
    print('i=' + str(i))
    for j in range(i + 1, len(x)):
        print(' j=' + str(j))
        print(x[j] - x[i])
        if x[j] - x[i] > k:
            print(':(')
            quit()
    
print('Yay!')

Failing test case input:
1
0
5
8
4
0

Expected output:
:(


Actual output:
i=0
 j=1
-1
 j=2
4
:(


Fixed submission (verdict: Accepted):
x = []
for i in range(5):
    x.append(int(input()))

k=int(input())

for i in range(len(x) - 1):
    for j in range(i + 1, len(x)):
        if x[j] - x[i] > k:
            print(':(')
            quit()
    
print('Yay!')

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(':(')



Failing test case input:
1
0
4
8
18
15

Expected output:
:(


Actual output:
Yay!


Fixed submission (verdict: Accepted):
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(':(')
Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):





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

if abs(a-b) > k or abs(b-c) > k or abs(c-d) > k or abs(d-e) > k or abs(a-d) > k:
    print(":(")
else:
    print("Yay!")


Failing test case input:
1
0
4
8
18
15

Expected output:
:(


Actual output:
Yay!


Fixed submission (verdict: Accepted):

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


if abs(a-b) > k or abs(b-c) > k or abs(c-d) > k or abs(d-e) > k or abs(a-d) > k or abs(a-c) > k or abs(a-e) > k or abs(b-d) > k or abs(b-e) > k or abs(c-e) > k:
    print(":(")
else:
    print("Yay!")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b = input()
c = input()
d = input()
e = int(input())
k = input()
x = e-a
if x <= 15:
    print("Yay!")
else:
    print(":(")


Failing test case input:
1
0
5
8
4
0

Expected output:
:(


Actual output:
Yay!


Fixed submission (verdict: Accepted):
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(":(")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 ":(")

Failing test case input:
1
0
5
5
8
22

Expected output:
Yay!


Actual output:
:(


Fixed submission (verdict: Accepted):
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 ":(")

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(':(')

Failing test case input:
1
1
14
13
8
23

Expected output:
Yay!


Actual output:
:(


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

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = [int(input()) for i in range(6)] 
count = 0
for i in range(5):
  for j in range(5):
    if abs(N[i]-N[j]) >= N[5]:
      count += 1

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

Failing test case input:
1
-2
5
13
6
15

Expected output:
Yay!


Actual output:
:(


Fixed submission (verdict: Accepted):
N = [int(input()) for i in range(6)] 
count = 0
for i in range(5):
  for j in range(5):
    if abs(N[i]-N[j]) > N[5]:
      count += 1

if count == 0:
  print("Yay!")
else:
  print(":(")
Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
for i in range(4):
    e = int(input())
k = int(input())
if e - a <= 15:
    print('Yay!')
else:
    print(':(')

Failing test case input:
15
0
4
1
22
5

Expected output:
:(


Actual output:
Yay!


Fixed submission (verdict: Accepted):
a = int(input())
for i in range(4):
    e = int(input())
k = int(input())
if e - a <= k:
    print('Yay!')
else:
    print(':(')

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
List=[int(input()) for i in range(6)]
if List[0]-List[4]<=List[5]:
  print('Yay!')
else:
  print(':(')


Failing test case input:
15
18
52
35
36
16

Expected output:
:(


Actual output:
Yay!


Fixed submission (verdict: Accepted):
List=[int(input()) for i in range(6)]
if abs(List[0]-List[4])<=List[5]:
  print('Yay!')
else:
  print(':(')

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
15
18
26
30
21
2

Expected output:
:(


Actual output:
>>:(


Fixed submission (verdict: Accepted):
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)

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(':(')
    

Failing test case input:
1
1
8
2
14
23

Expected output:
Yay!


Actual output:
Yey!


Fixed submission (verdict: Accepted):
from sys import stdin

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

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

Problem: p03075
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if max(a, b, c, d, e) - min(a, b, c, d, e) > 15:
  print(':(')
else:
  print('Yay!')


Failing test case input:
1
0
9
0
5
3

Expected output:
:(


Actual output:
Yay!


Fixed submission (verdict: Accepted):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if max(a, b, c, d, e) - min(a, b, c, d, e) > k:
  print(':(')
else:
  print('Yay!')