ZhenlongDai/ACPR huggingface dataset:
Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
x,y=map(int,input().split())
ans=0
if x<4:
    ans += x*100000
if y<4:
    ans += y*100000
if x==y and x==1:
    ans += 400000
print(ans)

Failing test case input:
57 1

Expected output:
300000


Actual output:
100000


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
ans=0
if x<4:
    ans += (4-x)*100000
if y<4:
    ans += (4-y)*100000
if x==y and x==1:
    ans += 400000
print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
ans = 0
if X >= 3:
    ans += (4 - X) * 100000
if Y >= 3:
    ans += (4 - Y) * 100000
if X == 1 and Y == 1:
    ans += 400000

print(ans)

Failing test case input:
57 8

Expected output:
0


Actual output:
-5700000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
ans = 0
if X <= 3:
    ans += (4 - X) * 100000
if Y <= 3:
    ans += (4 - Y) * 100000
if X == 1 and Y == 1:
    ans += 400000

print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
z = [300000, 20000, 100000, 0]
if x > 3: x = 4
if y > 3: y = 4
if x == y == 1:
    print(1000000)
else:
    print(z[~-x] + z[~-y])


Failing test case input:
2 122

Expected output:
200000


Actual output:
20000


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
z = [300000, 200000, 100000, 0]
if x > 3: x = 4
if y > 3: y = 4
if x == y == 1:
    print(1000000)
else:
    print(z[~-x] + z[~-y])

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


X, Y = map(int, input().split())

sum = 0
if(X == 1):
  sum = 300000
elif(X == 2):
  sum = 200000
elif(X == 3):
  sum = 10000

if(Y == 1):
  sum += 300000
elif(Y == 2):
  sum += 200000
elif(Y == 3):
  sum += 100000

if(X == 1 and Y == 1):
  sum += 400000

print(sum)


Failing test case input:
3 21

Expected output:
100000


Actual output:
10000


Fixed submission (verdict: Accepted):


X, Y = map(int, input().split())

sum = 0
if(X == 1):
  sum = 300000
elif(X == 2):
  sum = 200000
elif(X == 3):
  sum = 100000

if(Y == 1):
  sum += 300000
elif(Y == 2):
  sum += 200000
elif(Y == 3):
  sum += 100000

if(X == 1 and Y == 1):
  sum += 400000

print(sum)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y=map(int,input().split())
x=0 if x>=4 else x
y=0 if y>=4 else y
print(1000000 if x==1 and y==1 else (x+y)*100000)

Failing test case input:
11 001

Expected output:
300000


Actual output:
100000


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
x=0 if x>=4 else 4-x
y=0 if y>=4 else 4-y
print(1000000 if x==3 and y==3 else (x+y)*100000)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


x, y = map(int, input().split())
money = 0


if x == 1:
  money += 300000
elif x == 2:
  money += 200000
elif x == 3:
  money += 300000


if y == 1:
  money += 300000
elif y == 2:
  money += 200000
elif y == 3:
  money += 300000
  

if x == 1 and y == 1:
  money += 400000

print(money)

Failing test case input:
3 21

Expected output:
100000


Actual output:
300000


Fixed submission (verdict: Accepted):


x, y = map(int, input().split())
money = 0


if x == 1:
  money += 300000
elif x == 2:
  money += 200000
elif x == 3:
  money += 100000


if y == 1:
  money += 300000
elif y == 2:
  money += 200000
elif y == 3:
  money += 100000
  

if x == 1 and y == 1:
  money += 400000

print(money)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X,Y = map(int,input().split())
ans = 0
if (X>=4)and(Y>=4):
  print(ans)
  
else:
  ans += 300000-100000*(X-1) + 300000-100000*(Y-1)
  
  if (X==1)and(Y==1):
    ans += 400000
    
  print(ans)

Failing test case input:
11 001

Expected output:
300000


Actual output:
-400000


Fixed submission (verdict: Accepted):
X,Y = map(int,input().split())
ans = 0
if X<=3:
  ans += 300000-100000*(X-1)
  
if Y<=3:
  ans += 300000-100000*(Y-1)
  
if (X==1)and(Y==1):
  ans += 400000
  
print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = 0
for x in map(int, input().split()):
    if x == 1:
        a += 300000
    elif x == 2:
        a += 200000
    elif x == 3:
        a += 300000
if x == 600000:
    s = 1000000
print(x)
    

Failing test case input:
77 9

Expected output:
0


Actual output:
9


Fixed submission (verdict: Accepted):
s = 0
for i in map(int, input().split()):
    if i == 1:
        s+=300000
    elif i ==2 :
        s+= 200000
    elif i ==3 :
        s+= 100000
if s== 600000:
    s = 1000000
print(s)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y=map(int,input().split())
a=0
if x==3:
    a+=1
if y==3:
    a+=1
if x==2:
    a+=2
if y==2:
    a+=2
if x==1:
    a+=3
if x==1:
    a+=3
if x==y==1:
    a+=4
print(a*100000)


Failing test case input:
6 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
a=0
if x==3:
    a+=1
if y==3:
    a+=1
if x==2:
    a+=2
if y==2:
    a+=2
if x==1:
    a+=3
if y==1:
    a+=3
if x==1 and y==1:
    a+=4
print(a*100000)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
 
prices = {1: 300000, 2: 200000, 3: 100000}
 
ans = 0
if X < 4:
    ans += prices[X]
 
if Y < 4:
    ans += prices[Y]
 
if Y == 1 & X == 1:
    ans += 400000
 
print(ans)

Failing test case input:
57 1

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
 
prices = {1: 300000, 2: 200000, 3: 100000}
 
ans = 0
if X < 4:
    ans += prices[X]
 
if Y < 4:
    ans += prices[Y]
 
if Y == 1 and X == 1:
    ans += 400000
 
print(ans)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int, input().split())
point = 0
if x == 1 and y == 1:
    point = 40000
    
if x == 1:
    point += 30000
elif x == 2:
    point += 20000
elif x == 3:
    point += 10000
else:
    pass

if y == 1:
    point += 30000
elif y == 2:
    point += 20000
elif y == 3:
    point += 10000
else:
    pass

print(point)



Failing test case input:
2 122

Expected output:
200000


Actual output:
20000


Fixed submission (verdict: Accepted):
x,y = map(int, input().split())
point = 0
if x == 1 and y == 1:
    point = 400000
    
if x == 1:
    point += 300000
elif x == 2:
    point += 200000
elif x == 3:
    point += 100000
else:
    pass

if y == 1:
    point += 300000
elif y == 2:
    point += 200000
elif y == 3:
    point += 100000
else:
    pass

print(point)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b= map(int, input().split())
n=0
if a<4:
    n=300000/a
if b<4:
    n=n+(300000/b)
if a==1&b==1:
    n=1000000
print(int(n))

Failing test case input:
2 122

Expected output:
200000


Actual output:
150000


Fixed submission (verdict: Accepted):
a,b= map(int, input().split())
n=0
if a<4:
    n=n+300000-(a-1)*100000
if b<4:
    n=n+300000-(b-1)*100000
if (a==1)&(b==1):
    n=n+400000
print(int(n))

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
m = {3:100000, 2:200000, 1:300000}
def f(a):
    if a <= 3:
        return m[a]
    return 0
x, y = map(int, input().split())
print(f(x) + f(y) + (x & y) * 400000)

Failing test case input:
37 52

Expected output:
0


Actual output:
14400000


Fixed submission (verdict: Accepted):
m = {3:100000, 2:200000, 1:300000}
def f(a):
    if a <= 3:
        return m[a]
    return 0
def g(a, b):
    return 400000 if (a == 1 and a == b) else 0
x, y = map(int, input().split())
print(f(x) + f(y) + g(x, y))

Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
x, y = [int(x) for x in input().split()]
ans = 0

for i in [x, y]:
    if x == 1:
        ans += 300000
    elif x == 2:
        ans += 200000
    elif x == 3:
        ans += 100000
    
if x == 1 and y == 1:
    ans += 400000

print(ans)

    

Failing test case input:
6 001

Expected output:
300000


Actual output:
0


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

x, y = [int(x) for x in input().split()]
ans = 0

for i in [x, y]:
    if i == 1:
        ans += 300000
    elif i == 2:
        ans += 200000
    elif i == 3:
        ans += 100000
    
if x == 1 and y == 1:
    ans += 400000

print(ans)
Problem: p02853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = list(map(int,input().split()))
ans = 0
for v in a:
    if v == 1:
        ans += 300000
    elif v == 2:
        ans += 200000
    else:
        ans += 100000
if sum(a) == 2:
    ans += 400000
print(ans)

Failing test case input:
57 52

Expected output:
0


Actual output:
200000


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
ans = 0
for v in a:
    if v == 1:
        ans += 300000
    elif v == 2:
        ans += 200000
    elif v == 3:
        ans += 100000
if sum(a) == 2:
    ans += 400000
print(ans)

Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
x,y=[int(s) for s in input().split()]
ans=0
if x<4:
  ans+=10000
if x<3:
  ans+=10000
if x<2:
  ans+=10000
if y<4:
  ans+=10000
if y<3:
  ans+=10000
if y<2:
  ans+=10000
if x*y==1:
  ans+=40000
print(ans)
  

Failing test case input:
3 21

Expected output:
100000


Actual output:
10000


Fixed submission (verdict: Accepted):
x,y=[int(s) for s in input().split()]
ans=0
if x<4:
  ans+=100000
if x<3:
  ans+=100000
if x<2:
  ans+=100000
if y<4:
  ans+=100000
if y<3:
  ans+=100000
if y<2:
  ans+=100000
if x*y==1:
  ans+=400000
print(ans)

Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
x, y = [int(x) for x in input().split()]
ans = 0

for i in [x, y]:
    if x == 1:
        ans += 300000
    elif x == 2:
        ans += 200000
    elif x == 3:
        ans += 100000
    
if x == 1 and y == 1:
    ans += 400000

    

Failing test case input:
57 6

Expected output:
0


Actual output:

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

x, y = [int(x) for x in input().split()]
ans = 0

for i in [x, y]:
    if i == 1:
        ans += 300000
    elif i == 2:
        ans += 200000
    elif i == 3:
        ans += 100000
    
if x == 1 and y == 1:
    ans += 400000

print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
r = 0
if(X == 1):
  r += 300000
elif(X == 2):
  r += 200000
elif(X == 3):
  r += 300000
else:
  pass

if(Y == 1):
  r += 300000
elif(Y == 2):
  r += 200000
elif(Y == 3):
  r += 300000

if(X == Y == 1):
  r += 400000

print(r)

Failing test case input:
3 21

Expected output:
100000


Actual output:
300000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
r = 0
if(X == 1):
  r += 300000
elif(X == 2):
  r += 200000
elif(X == 3):
  r += 100000
else:
  pass

if(Y == 1):
  r += 300000
elif(Y == 2):
  r += 200000
elif(Y == 3):
  r += 100000
else:
  pass

if(X == Y == 1):
  r += 400000

print(r)
Problem: p02853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = list(map(int,input().split()))
ans = 0
for v in a:
    if v == 1:
        ans += 30000
    elif v == 2:
        ans += 20000
    else:
        ans += 10000
if sum(a) == 2:
    ans += 40000
print(ans)

Failing test case input:
57 6

Expected output:
0


Actual output:
20000


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
ans = 0
for v in a:
    if v == 1:
        ans += 300000
    elif v == 2:
        ans += 200000
    elif v == 3:
        ans += 100000
if sum(a) == 2:
    ans += 400000
print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = list(map(int, input().split()))
top_count = 0
ans = 0
for i in x:
  if i == 1:
    ans += 300000
    top_count += 1

  elif i ==2:
    ans += 200000

  elif i == 3:
    ans += 100000
if top_count != 0:
  print(ans + 400000)
else:
  print(ans)

Failing test case input:
11 001

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
x = list(map(int, input().split()))
top_count = 0
ans = 0
for i in x:
  if i == 1:
    ans += 300000
    top_count += 1

  elif i == 2:
    ans += 200000

  elif i == 3:
    ans += 100000

if top_count == 2:
  print(ans + 400000)
else:
  print(ans)

Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
X, Y = map(int, input().split())

ans = 0
if X < 4:
    ans += (4 - X) * 10**5

if Y < 4:
    ans += (4 - X) * 10**5

if X == 1 and Y == 1:
    ans += 4 * 10**5

print(ans)

Failing test case input:
6 001

Expected output:
300000


Actual output:
-200000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())

ans = 0
if X < 4:
    ans += (4 - X) * 10**5

if Y < 4:
    ans += (4 - Y) * 10**5

if X == 1 and Y == 1:
    ans += 4 * 10**5

print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y=map(int,input().split())
ans=8-(x+y)
if ans==6:
  ans+=4
print(ans*100000)

Failing test case input:
10 010

Expected output:
0


Actual output:
-1200000


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
ans=max(0,4-x)+max(0,4-y)
if ans==6:
  ans+=4
print(ans*100000)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = list(map(int, input().split()))
top_count = 0
ans = 0
for i in x:
  if i == 1:
    ans += 300000
    top_count += 1

  elif i == 2:
    ans += 200000

  elif i == 3:
    ans += 100000
    
if top_count != 0:
  print(ans + 400000)
else:
  print(ans)

Failing test case input:
11 001

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
x = list(map(int, input().split()))
top_count = 0
ans = 0
for i in x:
  if i == 1:
    ans += 300000
    top_count += 1

  elif i == 2:
    ans += 200000

  elif i == 3:
    ans += 100000

if top_count == 2:
  print(ans + 400000)
else:
  print(ans)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int,input().split())
AnswerX = 0
AnswerY = 0
AnswerW = 0
if X*Y == 1:
  AnswerW = 400000
if X == 1:
  AnswerX= 300000
elif X==2:
  AnswerX = 20000
elif X==3:
  AnswerX = 10000
if Y == 1:
  AnswerY= 300000
elif Y==2:
  AnswerY = 20000
elif Y==3:
  AnswerY = 10000
  
Answer = AnswerX + AnswerY + AnswerW
print(Answer)

Failing test case input:
2 122

Expected output:
200000


Actual output:
20000


Fixed submission (verdict: Accepted):
X, Y = map(int,input().split())
AnswerX = 0
AnswerY = 0
AnswerW = 0
if X*Y == 1:
  AnswerW = 400000
if X == 1:
  AnswerX= 300000
elif X==2:
  AnswerX = 200000
elif X==3:
  AnswerX = 100000
if Y == 1:
  AnswerY= 300000
elif Y==2:
  AnswerY = 200000
elif Y==3:
  AnswerY = 100000
  
Answer = AnswerX + AnswerY + AnswerW
print(Answer)

Problem: p02853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    X, Y = map(int, input().split())

    ans = 0
    if 1 <= X <= 3:
        ans += 100000 * (4 - X)

    if 1 <= Y <= 3:
        ans += 100000 * (4 - X)

    if X == 1 and Y == 1:
        ans += 400000
    print(ans)

if __name__ == "__main__":
    main()

Failing test case input:
57 1

Expected output:
300000


Actual output:
-5300000


Fixed submission (verdict: Accepted):
def main():
    X, Y = map(int, input().split())

    ans = 0
    if 1 <= X <= 3:
        ans += 100000 * (4 - X)

    if 1 <= Y <= 3:
        ans += 100000 * (4 - Y)

    if X == 1 and Y == 1:
        ans += 400000
    print(ans)

if __name__ == "__main__":
    main()

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
ans =0
if x == 1:
	ans += 300000
elif x == 2:
	ans += 200000
elif x == 3 :
	ans += 100000

if y == 1:
	ans += 300000
elif y == 2:
	ans += 200000
elif y == 3 :
	ans += 100000

if x == 1 and y == 1:
	ans += 400000
	print(ans)

Failing test case input:
57 1

Expected output:
300000


Actual output:

Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
ans =0
if x == 1:
	ans += 300000
elif x == 2:
	ans += 200000
elif x == 3 :
	ans += 100000

if y == 1:
	ans += 300000
elif y == 2:
	ans += 200000
elif y == 3 :
	ans += 100000

if x == 1 and y == 1:
	ans += 400000

print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
ans = 0
for z in [X,Y]:
  if z == 3:
    ans += 10**5
  elif z == 2:
    ans += 2*10**5
  elif z == 1:
    ans += 3*10**5
if X == Y:
  ans += 4*10**5
print(ans)

Failing test case input:
10 010

Expected output:
0


Actual output:
400000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
ans = 0
for z in [X,Y]:
  if z == 3:
    ans += 10**5
  elif z == 2:
    ans += 2*10**5
  elif z == 1:
    ans += 3*10**5
if X == Y == 1:
  ans += 4*10**5
print(ans)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
if x + y == 2:
  print(100000)
elif x + y == 3:
  print(50000)
elif x + y == 5:
  print(30000)
elif x + y == 4:
  print(40000)
elif x + y == 6:
  print(20000)
elif x + y >=5 and min(x,y) == 1:
  print(30000)
elif x + y >=5 and min(x,y) == 2:
  print(20000)
elif x + y >=5 and min(x,y) == 3:
  print(10000)
else:
  print(0)

Failing test case input:
3 21

Expected output:
100000


Actual output:
10000


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
if x + y == 2:
  print(1000000)
elif x + y == 3:
  print(500000)
elif x + y == 5:
  print(300000)
elif x + y == 4:
  print(400000)
elif x + y == 6:
  print(200000)
elif x + y >=5 and min(x,y) == 1:
  print(300000)
elif x + y >=5 and min(x,y) == 2:
  print(200000)
elif x + y >=5 and min(x,y) == 3:
  print(100000)
else:
  print(0)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())

ans = 0

if X == 3:
    ans += 100000
elif X == 2:
    ans += 200000
elif X == 1:
    ans + 300000

if Y == 3:
    ans += 100000
elif Y == 2:
    ans += 200000
elif Y == 1:
    ans + 300000


if ans == 600000:
    ans += 400000

print(ans)


Failing test case input:
6 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())

ans = 0

if X == 3:
    ans += 100000
elif X == 2:
    ans += 200000
elif X == 1:
    ans += 300000

if Y == 3:
    ans += 100000
elif Y == 2:
    ans += 200000
elif Y == 1:
    ans += 300000


if ans == 600000:
    ans += 400000

print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = [int(i) for i in input().split()]
T=0
for i in range(2):
        if n[i] == 1: T+=3
        elif n[i] == 1: T+=2
        elif n[i] == 3: T+=1
if sum(n)==2: T+=4
print(T*100000)

Failing test case input:
2 122

Expected output:
200000


Actual output:
0


Fixed submission (verdict: Accepted):
n = [int(i) for i in input().split()]
T=0
for i in range(2):
        if n[i] == 1: T+=3
        elif n[i] == 2: T+=2
        elif n[i] == 3: T+=1
if sum(n)==2: T+=4
print(T*100000)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input_line = input().split()
num_1 = int(input_line[0])
num_2 = int(input_line[1])
worse = 0
if num_1 == 1:
  worse += 300000
elif num_1 == 2:
  worse += 200000
elif num_1 == 3:
  worse += 100000
if num_2 == 1:
  worse += 300000
elif num_2 == 2:
  worse += 200000
elif num_2 == 3:
  worse += 100000
if num_1 == 1 and num_2 == 1:
  worse += 400000

Failing test case input:
57 24

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
input_line = input().split()
num_1 = int(input_line[0])
num_2 = int(input_line[1])
worse = 0
if num_1 == 1:
  worse += 300000
elif num_1 == 2:
  worse += 200000
elif num_1 == 3:
  worse += 100000
if num_2 == 1:
  worse += 300000
elif num_2 == 2:
  worse += 200000
elif num_2 == 3:
  worse += 100000
if num_1 == 1 and num_2 == 1:
  worse += 400000
print(worse)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())

p = 0
pr = [300000,200000,100000]

if(x < 3):p += pr[x-1]
if(y < 3):p += pr[y-1]

if(x == y and x == 1):p += 400000

print(p)

Failing test case input:
3 21

Expected output:
100000


Actual output:
0


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())

p = 0
pr = [300000,200000,100000]

if(x <= 3):p += pr[x-1]
if(y <= 3):p += pr[y-1]

if(x == y and x == 1):p += 400000

print(p)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    x,y=list(map(int,input().split(" ")))
    ans=0
    if x==1 and y==1:
        print(300000+300000+400000)
    else:
        if x==1:
            ans=300000
        elif x==2:
            ans=200000
        else:
            ans=100000
        if y==1:
            ans+=300000
        elif y==2:
            ans+=200000
        else:
            ans+=100000
        print(ans)

if __name__=="__main__":
    main()

Failing test case input:
67 8

Expected output:
0


Actual output:
200000


Fixed submission (verdict: Accepted):
def main():
    x,y=list(map(int,input().split(" ")))
    ans=0
    if x==1 and y==1:
        print(300000+300000+400000)
    else:
        if x==1:
            ans=300000
        elif x==2:
            ans=200000
        elif x==3:
            ans=100000
        if y==1:
            ans+=300000
        elif y==2:
            ans+=200000
        elif y==3:
            ans+=100000
        print(ans)

if __name__=="__main__":
    main()

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = input().split()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 or int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    pass

Failing test case input:
6 001

Expected output:
300000


Actual output:
700000


Fixed submission (verdict: Accepted):
x, y = input().split()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 and int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
if x * y == 1:
    print(1000000)
elif x*y == 2:
    print(500000)
elif x == 2 and y == 2:
    print(400000)
elif x*y == 3:
    print(400000)
elif x == 1 or y == 1:
    print(300000)
elif x == 2 and y == 3:
    print(300000)
elif x == 3 and y == 2:
    print(300000)
elif x == 3 and y == 3:
    print(200000)
elif x == 3 or y == 3:
    print(100000)
else:
    print(0)

Failing test case input:
2 122

Expected output:
200000


Actual output:
0


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
if x * y == 1:
    print(1000000)
elif x*y == 2:
    print(500000)
elif x == 2 and y == 2:
    print(400000)
elif x*y == 3:
    print(400000)
elif x == 1 or y == 1:
    print(300000)
elif x == 2 and y == 3:
    print(300000)
elif x == 3 and y == 2:
    print(300000)
elif x == 3 and y == 3:
    print(200000)
elif x ==2 or y == 2:
    print(200000)
    
elif x == 3 or y == 3:
    print(100000)
else:
    print(0)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
if x * y == 1:
    print(1000000)
elif x*y == 2:
    print(500000)

elif x*y == 3:
    print(400000)

elif x == 1 or y == 1:
    print(300000)
elif x == 2 and y == 3:
    print(300000)
elif x == 3 and y == 2:
    print(300000)
elif x == 3 or y == 3:
    print(100000)
else:
    print(0)

Failing test case input:
2 122

Expected output:
200000


Actual output:
0


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
if x * y == 1:
    print(1000000)
elif x*y == 2:
    print(500000)
elif x == 2 and y == 2:
    print(400000)
elif x*y == 3:
    print(400000)
elif x == 1 or y == 1:
    print(300000)
elif x == 2 and y == 3:
    print(300000)
elif x == 3 and y == 2:
    print(300000)
elif x == 3 and y == 3:
    print(200000)
elif x ==2 or y == 2:
    print(200000)
    
elif x == 3 or y == 3:
    print(100000)
else:
    print(0)

Problem: p02853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x,y = map(int,input().split())
if(x+y==2):
  print(1000000)
else:
  answer = 0
  if(x==2):
    answer+=200000
  elif(x==3):
    answer +=100000
  if(y==2):
    answer+=200000
  elif(y==3):
    answer +=100000
  print(answer)

Failing test case input:
6 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
if(x+y==2):
  print(1000000)
else:
  answer = 0
  if(x==2):
    answer+=200000
  elif(x==3):
    answer+=100000
  elif(x==1):
    answer+=300000
  if(y==2):
    answer+=200000
  elif(y==3):
    answer+=100000
  elif(y==1):
    answer+=300000
  print(answer)
Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline


def main():
    X, Y = list(map(int, input().split()))
    
    ans = 0

    if X == 3:
        ans += 100000
    elif X == 2:
        ans += 100000
    elif X == 1:
        ans += 300000

    if Y == 3:
        ans += 100000
    elif Y == 2:
        ans += 100000
    elif Y == 1:
        ans += 300000

    if X == 1 and Y == 1:
        ans += 400000

    print(ans)


if __name__ == '__main__':
    main()


Failing test case input:
2 122

Expected output:
200000


Actual output:
100000


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


def main():
    X, Y = list(map(int, input().split()))
    
    ans = 0

    if X == 3:
        ans += 100000
    elif X == 2:
        ans += 200000
    elif X == 1:
        ans += 300000

    if Y == 3:
        ans += 100000
    elif Y == 2:
        ans += 200000
    elif Y == 1:
        ans += 300000

    if X == 1 and Y == 1:
        ans += 400000

    print(ans)


if __name__ == '__main__':
    main()

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b= map(int, input().split())
n=0
if a>4:
    n=300000/a
if b>4:
    n=n+300000/b
if a==1&b==1:
    n=1000000
print(n)

Failing test case input:
2 122

Expected output:
200000


Actual output:
2459.0163934426228


Fixed submission (verdict: Accepted):
a,b= map(int, input().split())
n=0
if a<4:
    n=n+300000-(a-1)*100000
if b<4:
    n=n+300000-(b-1)*100000
if (a==1)&(b==1):
    n=n+400000
print(int(n))

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = 0
for x in map(int, input().split()):
    if x == 1:
        a += 300000
    elif x == 2:
        a += 200000
    elif x == 3:
        a += 300000
if a == 600000:
    a = 1000000
print(a)

Failing test case input:
3 21

Expected output:
100000


Actual output:
300000


Fixed submission (verdict: Accepted):
s = 0
for i in map(int, input().split()):
    if i == 1:
        s+=300000
    elif i ==2 :
        s+= 200000
    elif i ==3 :
        s+= 100000
if s== 600000:
    s = 1000000
print(s)

Problem: p02853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def p(n):
    if n == 1:
        return 300000
    elif n == 2:
        return 200000
    elif n == 3:
        return 300000
    else:
        return 0

x, y = map(int, input().split())
ans = 0
if x == y == 1:
    ans += 400000
ans += p(x) + p(y)
print(ans)


Failing test case input:
3 21

Expected output:
100000


Actual output:
300000


Fixed submission (verdict: Accepted):
def p(n):
    if n == 1:
        return 300000
    elif n == 2:
        return 200000
    elif n == 3:
        return 100000
    else:
        return 0

x, y = map(int, input().split())
ans = 0
if x == y == 1:
    ans += 400000
ans += p(x) + p(y)
print(ans)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())

points = [-1, 100000, 200000, 300000, 0]
print(400000*(X==Y==1) + points[min(4, X)] + points[min(4, Y)])

Failing test case input:
3 21

Expected output:
100000


Actual output:
300000


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())

points = [-1, 300000, 200000, 100000, 0]
print(400000*(X==Y==1) + points[min(4, X)] + points[min(4, Y)])

Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
X,Y = map(int,input().split())
ans = 0
if X <= 3 :
  ans += (4-X)*100000
if Y <= 3 :
  ans += (4-X)*100000
if X == 1 and Y == 1:
  ans += 400000
print(ans)

Failing test case input:
11 001

Expected output:
300000


Actual output:
-700000


Fixed submission (verdict: Accepted):
X,Y = map(int,input().split())
ans = 0
if X <= 3 :
  ans += (4-X)*100000
if Y <= 3 :
  ans += (4-Y)*100000
if X == 1 and Y == 1:
  ans += 400000
print(ans)

Problem: p02853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x, y = map(int, input().split())
prize = [300000, 100000, 200000]
total = 0
if x <= 3:
    total += prize[x-1]
if y <= 3:
    total += prize[y-1]
if x == y == 1:
    total += 400000
print(total)

Failing test case input:
3 21

Expected output:
100000


Actual output:
200000


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
prize = [300000, 200000, 100000]
total = 0
if x <= 3:
    total += prize[x-1]
if y <= 3:
    total += prize[y-1]
if x == y == 1:
    total += 400000
print(total)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
get=0
if x==1 or y==1:
    get+=300000
if x==2 or y==1:
    get+=200000
if x==3 or y==1:
    get+=100000
if x==1 and y==1:
    get+=400000
print(get)

Failing test case input:
11 001

Expected output:
300000


Actual output:
600000


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
get=0
if x==1:
    get+=300000
if y==1:
    get+=300000
if x==2:
    get+=200000
if y==2:
    get+=200000
if x==3:
    get+=100000
if y==3:
    get+=100000
if x==1 and y==1:
    get+=400000
print(get)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
if x * y == 1:
    print(1000000)
elif x*y == 2:
    print(500000)
elif x == 2 and y == 2:
    print(400000)
elif x*y == 3:
    print(400000)
elif x == 1 or y == 1:
    print(300000)
elif x == 2 and y == 3:
    print(300000)
elif x == 3 and y == 2:
    print(300000)
elif x == 3 or y == 3:
    print(100000)
else:
    print(0)

Failing test case input:
2 122

Expected output:
200000


Actual output:
0


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
if x * y == 1:
    print(1000000)
elif x*y == 2:
    print(500000)
elif x == 2 and y == 2:
    print(400000)
elif x*y == 3:
    print(400000)
elif x == 1 or y == 1:
    print(300000)
elif x == 2 and y == 3:
    print(300000)
elif x == 3 and y == 2:
    print(300000)
elif x == 3 and y == 3:
    print(200000)
elif x ==2 or y == 2:
    print(200000)
    
elif x == 3 or y == 3:
    print(100000)
else:
    print(0)
Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())

prices = {1: 3e5, 2: 2e5, 3: 1e5}

ans = 0
if X < 4:
    ans += prices[X]

if Y < 4:
    ans += prices[Y]

if Y == 1 and X == 1:
    ans += 4e5

print(ans)
    


Failing test case input:
3 21

Expected output:
100000


Actual output:
100000.0


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
 
prices = {1: 300000, 2: 200000, 3: 100000}
 
ans = 0
if X < 4:
    ans += prices[X]
 
if Y < 4:
    ans += prices[Y]
 
if Y == 1 and X == 1:
    ans += 400000
 
print(ans)

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())
lis = [0]*205
lis[0] == 300000
lis[1] == 200000
lis[2] == 100000
if n == m and n == 1:
  print(1000000)
else:
  print(lis[n-1]+lis[m-1])


Failing test case input:
6 001

Expected output:
300000


Actual output:
0


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())
lis = [0]*205
lis[0] = 300000
lis[1] = 200000
lis[2] = 100000
if n == m and n == 1:
  print(1000000)
else:
  print(lis[n-1]+lis[m-1])

Problem: p02853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
x,y=map(int,input().split())
if x==1 and y==1:
    print(1000000)
    exit()
a=[300000,200000,100000]
if x>3:
    x=0
if y>3:
    y=0
if x==0 and y==0:
    print(0)
    exit()
print(a[x-1]+a[y-1])

Failing test case input:
2 122

Expected output:
200000


Actual output:
300000


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
if x==1 and y==1:
    print(1000000)
    exit()
a=[300000,200000,100000,0]
if x>3:
    x=0
if y>3:
    y=0
if x==0 and y==0:
    print(0)
    exit()
print(a[x-1]+a[y-1])

Problem: p02853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
ans = 0
if a == 1:ans += 300000
elif a == 2:ans += 200000
elif a == 2:ans += 100000
if b == 1:ans += 300000
elif b == 2:ans += 200000
elif b == 2:ans += 100000
print(ans)

Failing test case input:
3 21

Expected output:
100000


Actual output:
0


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
ans = 0
if a == 1:ans += 300000
elif a == 2:ans += 200000
elif a == 3:ans += 100000
if b == 1:ans += 300000
elif b == 2:ans += 200000
elif b == 3:ans += 100000
if ans == 600000:ans += 400000
print(ans)
Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
num_list = []
sum_ = 0
for i in range(n):
    num_list.append(int(input()))
num_list.sort()
for i in range(n):
    sum_ += num_list[i]
if sum_ % 10 != 0:
    print(sum_)
else:
    for i in range(n):
        if num_list[i] % 10 != 0:
            sum_ -= num_list[i]
            print(sum_)
            break

Failing test case input:
3
10
20
30

Expected output:
0

Actual output:

Fixed submission (verdict: Accepted):
n = int(input())
num_list = []
sum_ = 0
for i in range(n):
    num_list.append(int(input()))
num_list.sort()
for i in range(n):
    sum_ += num_list[i]
sum_1 = sum_
if sum_ % 10 != 0:
    print(sum_)
else:
    for i in range(n):
        if num_list[i] % 10 != 0:
            sum_ -= num_list[i]
            print(sum_)
            break
for i in range(n):
    if num_list[i] % 10 == 0:
        sum_1 -= num_list[i]
if sum_1 == 0:
    print(sum_1)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=sorted([int(input()) for _ in [0]*int(input())])
s1=0
if sum(a) % 10 != 0:
    print(sum(a))
else:
    for i in range(len(a)): 
        if a[i] % 10 !=0:
            s1=i
            break
    a.pop(i)
    print(sum(a))

Failing test case input:
3
10
20
30

Expected output:
0

Actual output:
30


Fixed submission (verdict: Accepted):
a=sorted([int(input()) for _ in [0]*int(input())])
s1=-1
if sum(a) % 10 != 0:
    print(sum(a))
else:
    for i in range(len(a)): 
        if a[i] % 10 !=0:
            s1=i
            break
    if s1!=-1:
        a.pop(s1)
        print(sum(a))
    else:
        print(0)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = [int(input()) for _ in range(N)]
t = sum(S)

if t%10==0:
    for s in sorted(S):
        if s%10!=0: break
    print(t-s)
else:
    print(t)

Failing test case input:
3
10
20
30

Expected output:
0

Actual output:
30


Fixed submission (verdict: Accepted):
N = int(input())
S = [int(input()) for _ in range(N)]
t = sum(S)

if t%10==0:
    f = True
    for s in sorted(S):
        if s%10!=0:
            f = False
            break
    if f:
        print(0)
    else:
        print(t-s)
else:
    print(t)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

s=[int(input()) for i in range(n)]

ans=sum(s)
if ans % 10 != 0:
    print(ans)
else:
    for i in range(len(s)):
        if s[i] % 10 != 0:
            print(ans-s[i])
    else:
        print(0)

Failing test case input:
3
-4
2
22

Expected output:
24


Actual output:
24
18
-2
0


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

s=[int(input()) for i in range(n)]
s.sort()
ans=sum(s)
if ans % 10 != 0:
    print(ans)
else:
    for i in range(len(s)):
        if s[i] % 10 != 0:
            print(ans-s[i])
            break
    else:
        print(0)
Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
s=[int(input()) for i in range(N)]
s.sort()
Su=0
for i in range (N):
    Su+=s[i]
if Su%10==0:
    m=s[0]
    while m%10==0 and i<N:
        if s[i]%10!=0:
            m=s[i]
        else:
            i+=1
    if i==N and m%10==0:
        print (0)
    else:
        Su-=m
        print (Su)


Failing test case input:
3
-156
-1
-1

Expected output:
-158


Actual output:

Fixed submission (verdict: Accepted):
N=int(input())
s=[int(input()) for i in range(N)]
s.sort()
Su=0
for i in range (N):
    Su+=s[i]
if Su%10==0:
    m=s[0]
    i=0
    while m%10==0 and i<N:
        if s[i]%10!=0:
            m=s[i]
        else:
            i+=1
    if i==N and m%10==0:
        print (0)
    else:
        Su-=m
        print (Su)
else:
    print (Su)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l=sorted(map(int,open(0).read().split()[1:]))
a=sum(l)
for t in l:
 if t%10:print(a-t);exit()
print(0)

Failing test case input:
3
2
10
2

Expected output:
14


Actual output:
12


Fixed submission (verdict: Accepted):
l=sorted(map(int,open(0).read().split()[1:]))
a=sum(l)
if a%10:print(a);exit()
for t in l:
 if t%10:print(a-t);exit()
print(0)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
L=sorted([int(input()) for i in range(n)])
S=sum(L)
if S%10!=0:
    print(S)
else:
    for i in range(n):
        if (S-L[i])%10!=0:
            print(S-L[i])
            exit()
print(0)

Failing test case input:
3
-15
9
1

Expected output:
-5


Actual output:
-5
0


Fixed submission (verdict: Accepted):
n=int(input())
L=sorted([int(input()) for i in range(n)])
S=sum(L)
if S%10!=0:
    print(S)
    exit()
else:
    for i in range(n):
        if (S-L[i])%10!=0:
            print(S-L[i])
            exit()
print(0)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = [int(input()) for _ in range(n)]

s.sort()
ans = sum(s)
if ans % 10 != 0:
    print(ans)
else:
    for i in range(n):
        ans -= s[i]
        if ans % 10 != 0:
            print(ans)
            quit()

print(0)

Failing test case input:
3
2
1
2

Expected output:
5


Actual output:
5
0


Fixed submission (verdict: Accepted):
n = int(input())
s = [int(input()) for _ in range(n)]

s.sort()
ans = sum(s)
if ans % 10 != 0:
    print(ans)
    quit()
else:
    for i in range(n):
        if (ans-s[i]) % 10 != 0:
            print(ans-s[i])
            quit()

print(0)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
S = [0]*n
for i in range(n):
    S[i] = int(input())
r = sum(S)
S.sort()
for i in range(n):
    if r%10 == 0 and S[i]%10!=0:
        r -= S[i]
        break
    if i==n-1:
        r = 0
print(r)

Failing test case input:
3
8
10
15

Expected output:
33


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
S = [0]*n
for i in range(n):
    S[i] = int(input())

r = sum(S)
S.sort()
for i in range(n):
    if r%10 != 0:
        break
    if r%10 == 0 and S[i]%10!=0:
        r -= S[i]
        break
    if i==n-1:
        r = 0
print(r)
Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
S = sorted(int(input()) for i in range(n))
ans = sum(S)
print(S)
for i in range(n):
  if ans % 10 == 0:
    if S[i] % 10 != 0:
      ans -= S[i]
    else:
      continue
print(ans)

Failing test case input:
3
5
10
10

Expected output:
25


Actual output:
[5, 10, 10]
25


Fixed submission (verdict: Accepted):
n = int(input())
S = sorted(int(input()) for i in range(n))
ans = sum(S)
cnt = 0
for i in range(n):
  if ans % 10 == 0:
    if S[i] % 10 != 0:
      ans -= S[i]
    else:
      cnt += 1
if cnt == n:
  print(0)
else:
  print(ans)

Problem: p03699
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())

score=[]
ans=0

for _ in range(n):
    s=int(input())
    ans+=s
    score.append(s)

if ans%10==0:
    ans=0

score=sorted(score,reverse=True)
for _ in range(n):
    score.pop()
    tmp=sum(score)
    if tmp%10==0:
        tmp=0

    ans=max(ans,tmp)


print(ans)
    

Failing test case input:
3
-156
-1
-1

Expected output:
-158


Actual output:
0


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

score=[]
for _ in range(n):
    s=int(input())
    score.append(s)


non10=[]
flg10=0
for i in range(n):
    if score[i]%10!=0:
        non10.append(score[i])
        flg10=1
    
if flg10==0:
    ans=0
else:
    if sum(score)%10==0:
        ans=sum(score)-min(non10)
    else:
        ans=sum(score)
print(ans)

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

a.sort(reverse=True)
s=sum(a)
if s%10==0:
    for i in a:
        if i%10>0:
            s-=i
            break
print(s)



Failing test case input:
3
2
8
0

Expected output:
8


Actual output:
2


Fixed submission (verdict: Accepted):
n=int(input())
a =[]
for i in range(n):
    a.append(int(input()))
 
a.sort()
s=sum(a)
if s%10==0:
    for i in a:
        if i%10>0:
            s-=i
            break
if s%10>0:
    print(s)
else:
    print(0)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = [int(input()) for i in range(n)]

res = sum(a)
if res%10 !=0:
    print(res)
    exit()

b = sorted(list(filter(lambda x:x%10!=0, a)))
if len(b) == 0:
    print(0)
    exit()
print(b)
print(res-b[0])


Failing test case input:
3
-4
2
22

Expected output:
24


Actual output:
[-4, 2, 22]
24


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(input()) for i in range(n)]

res = sum(a)
if res%10 !=0:
    print(res)
    exit()

b = sorted(list(filter(lambda x:x%10!=0, a)))
if len(b) == 0:
    print(0)
    exit()
print(res-b[0])
Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    n = int(input())
    s = [int(input()) for i in range(n)]

    sum_max = sum(s)

    if sum_max % 10 == 0:
        min_p = 101
        for i in s:
            if i % 10 != 0 and i < min_p:
                min_p = i

        if min_p == 101:
            sum_max = 0

    print(sum_max)


if __name__ == '__main__':
    main()


Failing test case input:
3
2
8
0

Expected output:
8


Actual output:
10


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    s = [int(input()) for i in range(n)]

    sum_max = sum(s)

    if sum_max % 10 == 0:
        min_p = 101
        for i in s:
            if i % 10 != 0 and i < min_p:
                min_p = i

        if min_p == 101:
            sum_max = 0
        else:
            sum_max -= min_p

    print(sum_max)


if __name__ == '__main__':
    main()

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
read = sys.stdin.buffer.read

N = int(input())
S = list(map(int, read().rstrip().split()))
sumS = sum(S)
if all(s % 10 == 0 for s in S):
    print(0)
elif sumS % 10 != 0:
    print(sumS)
else:
    S = sorted(S)
    for s in S:
        if s % 10 != 0:
            t = s
            print(sumS - t)
            break

Failing test case input:
3
-4
0
1

Expected output:
-3


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
S = [int(input()) for _ in range(N)]
sumS = sum(S)
if all(s % 10 == 0 for s in S):
    print(0)
elif sumS % 10 != 0:
    print(sumS)
else:
    S = sorted(S)
    for s in S:
        if s % 10 != 0:
            t = s
            break
    print(sumS - t)

Problem: p03699
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    n = int(input())
    ss = sorted([int(input()) for _ in range(n)])
    ans = sum(ss)
    if sum(ss) % 10 == 0:
        for i in range(n):
            if ss[i] % 10 != 0:
                ans -= ss[i]
                break
            ans = 0
    print(ans)


if __name__ == "__main__":
    main()


Failing test case input:
3
2
8
0

Expected output:
8


Actual output:
-2


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    ss = sorted([int(input()) for _ in range(n)])
    ans = sum(ss)
    Count = 0
    if ans % 10 == 0:
        for i in range(n):
            if ss[i] % 10 != 0:
                ans -= ss[i]
                break
            else:
                Count += 1

    if Count == n:
        ans = 0
    print(ans)


if __name__ == "__main__":
    main()

Problem: p03699
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=int(input())
b=[int(input()) for i in range(a)]
c=sum(b)
if c%10==0:
  for i in range(a):
    if b[i]%10!=0:
      print(c-b[i])
      break
else:
  print(c)

Failing test case input:
3
10
20
30

Expected output:
0

Actual output:

Fixed submission (verdict: Accepted):
a=int(input())
b=[int(input()) for i in range(a)]
b.sort()
c=sum(b)
d=0
if c%10!=0:
  print(c)
else:
  for i in range(a):
    if b[i]%10!=0:
      c=c-b[i]
      print(c)
      break
  if sum(b)==c:
    print(0)
Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = sorted([int(input()) for _ in range(N)])
if sum(s)%10 != 0:
    print(sum(s))
else:
    for i in range(N):
        if s[i]%10 != 0:
            print(sum(s)-s[i])
            break

Failing test case input:
3
10
20
30

Expected output:
0

Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
s = sorted([int(input()) for _ in range(N)])
if sum(s)%10 != 0:
    print(sum(s))
else:
    for i in range(N):
        if s[i]%10 != 0:
            print(sum(s)-s[i])
            break
        if i == N-1:
            print(0)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = [int(input()) for _ in range(N)]

if sum(s)%10 != 0:
    print(sum(s))
else:
    ans = sum(s)
    s.sort()
    for i in s:
        ans -= i
        if ans%10 != 0:
            print(ans)
            break
    print(ans)

Failing test case input:
3
-4
2
22

Expected output:
24


Actual output:
24
24


Fixed submission (verdict: Accepted):
N = int(input())
s = [int(input()) for _ in range(N)]

if sum(s)%10 != 0:
    print(sum(s))
else:
    ans = sum(s)
    s.sort()
    for i in s:
        ans -= i
        if ans%10 != 0:
            print(ans)
            exit()
        ans += i
    print(0)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=sorted([int(input()) for i in range(n)])
if sum(l)%10!=0:
  print(sum(l))
else:
  ans=sum(l)
  for i in range(n):
    if l[i]%10==0:
      ans-=l[i]
      print(ans)
      quit()
  print(0)

Failing test case input:
3
2
8
0

Expected output:
8


Actual output:
10


Fixed submission (verdict: Accepted):
n=int(input())
l=sorted([int(input()) for i in range(n)])
if sum(l)%10!=0:
  print(sum(l))
else:
  ans=sum(l)
  for i in range(n):
    if l[i]%10!=0:
      ans-=l[i]
      print(ans)
      quit()
  print(0)

Problem: p03699
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = [int(input()) for _ in range(n)]
s.sort()
summ = sum(s)
used = []
for j in range(n):
  for i in range(n):
    if not s[i] in used and str(summ - s[i])[-1] != 0:
      print(summ - s[i])
      exit()
  used.append(s[j])
  summ -= s[j]
print(0)

Failing test case input:
3
-34
1
0

Expected output:
-33


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
s = [int(input()) for _ in range(n)]
s.sort()
summ = sum(s)
used = []
if str(summ)[-1] != '0':
  print(summ)
  exit()
for j in range(n):
  for i in range(n):
    if s[i] in used:
      continue
    if str(summ - s[i])[-1] != '0':
      print(summ - s[i])
      exit()
  used.append(s[j])
  summ -= s[j]
print(0)