TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
print(eval('+'.join(input().sort())+'*10'))


a,b,c=map(int,input().split());print(max(a,b,c)*9+a,b,c)

a,b,c=map(int,input().split());print(max(a,b,c)*9+a+b+c)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
S = input()
T = input()
alphs = "abcdefghijklmnopqrstuvwxyz"
flag = False
for alph in alphs:
    S2 = S
    indlist = []
    while alph in S2:
        i = S.index(alph)
        indlist.append(i)
        S2 = S2[i+1:]
    if indlist != []:
        T2 = T[indlist[0]]
    for ind in indlist:
        if T[ind] != T2:
            print("No")
            flag = True
            break
    if flag:
        break
else:
    for alph in alphs:
        T3 = T
        indlist = []
        while alph in T3:
            i = T.index(alph)
            indlist.append(i)
            T3 = T3[i+1:]
        if indlist != []:
            S3 = S[indlist[0]]
        for ind in indlist:
            if S[ind] != T3:
                print("No")
                flag = True
                break
        if flag:
            break
    else:
        print("Yes")


N, M = map(int, input().split())
def factor(n):
    for i in range(2, int(n)):
        if n%i == 0:
            return(i)
            break
    else:
        return(int(n))
M2 = M
dic = {}
flag = True
while flag:
    p = factor(M2)
    dic[p] = dic.get(p, 0) + 1
    M2 = M2/p
    if M2 ==1:
        flag = False

def comb(n, r):
    s = 1
    for i in range(1, r+1):
        s *= (n-r+i)/i
    return(int(s%(10**9+7)))
s = 1
print(dic)
for value in dic.values():
    s *= int(comb(value+N-1, value)%(10**9+7))
print(s%(1e9+7))


nums = list(map(int, input().split()))
nums.sort()
print(nums[2]*10+nums[1]+nums[0])


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
n = sorted(list(map(int,"1 2 3".split())),reverse=True)
print(n[0]*10+n[1]+n[2])

n = sorted(list(map(int,input().split())),revese=True)
print(10*n[0]+n[1]+n[2])



n = sorted([int(num) for num in input().split()])
print(n[2]*10+n[1]+n[0])


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a = list(map(int,input()))
a.sort(reverse=True)
print(int(str(a[0])+str(a[1])) + a[2])

a = list(map(int,input().split()))
a.sort(reverse=True)
print(int(str(a[0])+str(a[1])) + a[2])


Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a = list(map(int, input().split())).sort()
print(a[-1] * 10 + a[0] + a[1])

a = sorted(map(int, input().split()))
print(a[-1] * 10 + a[0] + a[1])

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
A, B, C = map(int, input().split())
X = 10*A + B + C
Y = 10*B + A + C
Z = 10*C + A + B
print(max[X, Y, Z])

A, B, C = map(int, input().split())
X = 10*A + B + C
Y = 10*B + A + C
Z = 10*C + A + B
print(max(X, Y, Z))

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
n, m, X,Y = map(int,input().split())
x = list(int(i) for i in input().split())
y = list(int(i) for i in input().split())

x.sort()
y.sort()

if x[-1] < Y and y[0] >X and x[-1] < y[0]:
    print("No War")
else:
    print("War")

a = list(int(i) for i in input().split())
a.sort()
print(10*a[0]+a[1] + a[2])


a = list(int(i) for i in input().split())
a.sort()
print(10*a[2]+a[1] + a[0])


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
A = list(map(int, input().split()))
A.sort(reverse = True)

print(A[0] * 10 + A[1] + A[2]

A = list(map(int, input().split()))
A.sort(reverse = True)

print(A[0] * 10 + A[1] + A[2])

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
# coding: utf-8
# Your code here!
N,M,X,Y=[int(i) for i in input().split()]
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]

x.sort()
y.sort()

#print(x,y)

if x[-1] < y[0]:
    print("No War")
else:
    print("War")




# coding: utf-8
# Your code here!
a,b,c=[int(i) for i in input().split()]


print(10*max(a,b,c) + a+b+c - max(a,b,c) )


Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a=list(map(int,input().split()))
a.sort()
print(a[0]*10+a[1]+a[2])

a=list(map(int,input().split()))
a.sort(reverse=True)
print(a[0]*10+a[1]+a[2])


Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

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

m=max(a,b,c)

if m==a:
    print((a+10)+b+c)
elif:m==b:
    print((b+10)+a+c)
else:
    print((c+10)+a+b)

a,b,c= map(int, input().split())

m=max(a,b,c)

if m==a:
    print(a*10+b+c)
elif m==b:
    print(b*10+a+c)
else:
    print(c*10+a+b)

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
l = sorted(map(int,input().split()),reversed=True)
print(eval(''.join(l[:2])+'+'+str(l[2])))

l = sorted(map(int,input().split()),reverse=True)
print(eval(''.join(map(str,l[:2]))+'+'+str(l[2])))

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
ABC = [int(abc) for abc in input().split()]
ABC.sort()
print(ABC[0]*10 + ABC[1] + ABC[2])

ABC = [int(abc) for abc in input().split()]
ABC.sort(reverse=True)
print(ABC[0]*10 + ABC[1] + ABC[2])

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
N = list(map(int, input().split()))
N.sort(reverse=True)
print(N)
print(N[0]*10 + N[1] + N[2])


N = list(map(int, input().split()))
N.sort(reverse=True)
print(N[0]*10 + N[1] + N[2])


Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
l = list(map(int,input().split()))
l.sort()
a =list[2]*10+list[1]+list[2]
print(a)

import os
l = list(map(int,input().split()))
l.sort()
a =l[2]*10+l[1]+l[2]
print(a)


import os
l = list(map(int,input().split()))
l.sort()
a =l[2]*10+l[1]+l[0]
print(a)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):

lst_A = input().split()

print(lst_A)

lst_A.sort()

ans = int(lst_A[2]) * 10 + int(lst_A[0]) + int(lst_A[1])

print(ans)


A = input()

lst_A = list(A)

lst_A.sort()

ans = int(lst_A[2]) * 10 + int(lst_A[0]) + int(lst_A[1])

print(ans)


lst_A = input().split()

lst_A.sort()

ans = int(lst_A[2]) * 10 + int(lst_A[0]) + int(lst_A[1])

print(ans)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
V = list(map(int, input().split()))
V = sorted(V, reversed=True)
ans = V[0] * 10 + V[1] + V[2]
print(ans)

V = list(map(int, input().split()))
V = sorted(V, reverse=True)
ans = V[0] * 10 + V[1] + V[2]
print(ans)


Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
n = list(map(int, input().split()))

nmax = max(n)
n.remove(nmax)
ans = max(n) * 10 + sum(n) 
print(ans)

n = list(map(int, input().split()))
nmax = max(n)
print(nmax * 10 + sum(n.remove(nmax)))

n = list(map(int, input().split()))
print(max(n) * 10 + sum(n.remove(nmax)))

n = list(map(int, input().split()))
nmax = max(n)
n.remove(nmax)
print(nmax * 10 + sum(n)) 

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a,b,c = sorted(map(int,input().split()))
print(a*10+b+c)

#ABC110A
a = sorted(list(map(int,input().split())))
print(a[2]*10+a[1]+a[0])

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a = list(map(int, input().split()))
print(a[0] + a[1] + a[2] * 10)

a = sorted(list(map(int, input().split())))
print(a[0] + a[1] + a[2] * 10)

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
N, M, X, Y = map(int, input().split())

x = list(map(int, input().split()))
y = list(map(int, input().split()))    
for z in range(X+1, Y+1):
    if (max(x) < z) and (z <= min(y)):
        print("No War")
        break
    else:
        print("War")

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

x = list(map(int, input().split()))
y = list(map(int, input().split()))    

for z in range(-100, 101):
    if (X < z) and (max(x) < z) and (z <= min(y) and (z <= Y):
        print("No War")
    else:
        print("War")

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

x = list(map(int, input().split()))
y = list(map(int, input().split()))    

for z in range(-100, 101):
    if (X < z) and (max(x) < z) and (min(y) >= z) and (Y >= z):
        print("No War")
    else:
        print("War")

A = int(input("A =",))
B = int(input("B =",))
C = int(input("C =",))

if A == max(A, B, C):
    x = 10*A + B + C
    print("お小遣いは", x)
elif B == max(A, B, C):
    x = A + 10*B + C
    print("お小遣いは", x)
elif C == max(A, B, C):
    x = A + B + 10*C
    print("お小遣いは", x)


N, M, X, Y = map(int, input().split())
 
x = list(map(int, input().split()))
y = list(map(int, input().split()))    
 
for z in range(-100, 101):
    if (X < z) and (max(x) < z) and (z <= min(y)) and (z <= Y):
        print("No War")
    else:
        print("War")

A = int()
B = int()
C = int()

if A == max(A, B, C):
    x = 10*A + B + C
    print("お小遣いは", x)
elif B == max(A, B, C):
    x = A + 10*B + C
    print("お小遣いは", x)
elif C == max(A, B, C):
    x = A + B + 10*C
    print("お小遣いは", x)


a, b, c = (int(x) for x in input().split())
print(a + b + c + max(a, b, c)*9)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a=list(map(int, input().split()))
a.sort()
print(10*a[0]+a[1]+a[2])

a=list(map(int, input().split()))
a.sort()
print(10*a[2]+a[1]+a[0])

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a, b, c = sorted(map(int(), input().split(" ")))
print(c * 10 + a + b)

a, b, c = sorted(map(int, input().split()))
print(c * 10 + b + a)


Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
list1 = map(list(int, input().split()))
list1 = sorted(list1, reverse=True)
print(list1[0]*10 +list[1]+list[2])


list1 = list(map(int, input().split()))
list1 = sorted(list1, reverse=True)
print(list1[0]*10 +list[1]+list[2])

list1 = list(map(int, input().split()))
list1 = sorted(list1, reverse=True)
print(list1[0]*10 +list1[1]+list1[2])


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
print('No War' if max(max(x),X)<min(min(y),Y) else 'War')

s=sorted(map(int,input().split()))
print(int(str(s[2])+str(s[1]))+s[0])


Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
abc=list(map(int,input().split()))
abc.sort(reverse=True)
print(sum(abc[:2])+abc[2])

abc=list(map(int,input().split()))
abc.sort(reverse=True)
print(abc[0]*10+abc[1]+abc[2])

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
x,y,z = input().split()
x=int(x) 
y=int(y)
z=int(z)
if (x>=y and x>=z):
    print(10*x + y + z)
    if (x<y and y>=z):
        print(x+10*y+z)
        if (x<z and y<z):
            print(x+y+10*z)

def com(n,m):
    if(n-m < m):
        m=n-m
    result=1
    mylist=[i for i in range(1,m+1)]
    j=1
    for i in range(1,m+1):
        result*=(n+1-i)
        if(j<m):
            while(result%mylist[j]==0):
                result//=mylist[j]
                j+=1
                if(j>=m):
                    break
    return result

def yakusuu(i,m):
    _i=i
    while(i**2<=m):
        if(m%i==0):
            return i
        else:
            i+=1
    for j in range(_i-1,0,-1):
        if(m%j==0):
            break
    return m//j
    

N,M=map(int,input().split())
soinsuubunkai={}
tmp=2
i=2
_M=M
while(tmp <=M):
    tmp=yakusuu(tmp,M)

    if(tmp in soinsuubunkai):
        soinsuubunkai[tmp]+=1
    else:
        soinsuubunkai[tmp]=1
    M//=tmp
    if(M==1):
        break


tmp=1
for k in list(soinsuubunkai.values()):
    tmp*=com(k+N-1,k)
    tmp%=10**9+7
print(tmp)

x,y,z = input().split()
x=int(x) 
y=int(y)
z=int(z)
if (x>=y and x>=z):
    print(10*x + y + z)
if (x<y and y>=z):
    print(x+10*y+z)
if (x<z and y<z):
     print(x+y+10*z)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
N,M,X,Y=map(int, input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
print("No War" if (max(x)<min(y) and X<Y and X<min(y) and Y>max(x)) else "War")

N,M,X,Y=map(int, input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
print('War' if int(X-max(x))>=int(Y-max(y)) else 'No War')

N,M,X,Y=map(int, input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
print('War' if max(x)>=max(y) else 'No War')

A,B,C=sorted(map(int,input().split()))
print(10*C+B+A)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
# -*- coding: utf-8 -*-
n,m,x,y = map(int,input().split())
xi = list(map(int,input().split()))
yi = list(map(int,input().split()))

xi.append(x)
yi.append(y)

xi.sort()
xi.reverse()
yi.sort()

if xi[0]<yi[0]:
    print("No War")
else:
    print("War")


# -*- coding: utf-8 -*-
list1 = list(map(int, input().split()))
list1.sort()
print(10*list1[2]+list1[1]+list1[0])


Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
l = list(map(int,input().split()))
l.sort()
print(l[0]*10 +l[1]+l[2])

l = list(map(int,input().split()))
l.sort()
print(l[2]*10 +l[1]+l[0])

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
abc = list(map(int,input().split()))
abc.sort()
pritn((abc[2]*10)+abc[1]+abc[0])

abc = list(map(int,input().split()))
abc.sort()
print((abc[2]*10)+abc[1]+abc[0])

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
# -*- coding: utf-8 -*-
A,B,C=map(int,input().split())
print(max(A*10+B+C, B*10+C+A C*10+A+B))

# -*- coding: utf-8 -*-
A,B,C=map(int,input().split())
print(max(A*10+B+C, B*10+C+A,  C*10+A+B))

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a,b,c = sorted(map(int,input().split()))
print(10*a + b+c)

a,b,c = sorted(map(int,input().split()))
print(10*c+b+a)

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
N, M = list(map(int, input().split(' ')))
MOD = int(1e9 + 7)
seeds = []
p = 2
while p*p > M:
  while M % p == 0:
    seeds.append(p)
    M = M // p
  p += 1
if M > 1:
  seeds.append(M)
 
def comb(n, k):
  ans = 1
  for i in range(1, k + 1):
    ans = (ans * (n + 1 - i) // i)
  return ans
 
ans = 1
hogehoge = set(seeds)
for i in hogehoge:
  a_ct = seeds.count(i)
  ans = (ans * comb(a_ct + N-1, min(a_ct, N-1))) % MOD
print(ans)


a, b, c = list(map(int, input().split(' ')))
print (max(a, b, c) * 9 + a + b + c)

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
A,B,C = map(int,input().split())
L = [A, B, C]
L.sort()
print(A + B + 10 * C)

A,B,C = map(int,input().split())
L = [A, B, C]
L.sort()
print(L[0] + L[1] + 10 * L[2])

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
# coding: utf-8

a, b, c = map(int, input().split())

x = a*10 + b
y = b*10 + c
z = c*10 + a

if x >= y and x >= z:
    print(x + c)
elif y >= x and y >= z:
    print(y + a)
else
    print(z + b)

# coding: utf-8
 
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))
 
if x < y:
    for i in range(x, y+1):
        if max(xn) < i and min(ym)>=i:
            print("War")
        elif i == y:
            print("No War")
else:
    print("No War")

# coding: utf-8
 
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))

if x < y:
    for i in range(x, y+1):
        if max(xn) < i and min(ym)>=i:
            print("No War")
            break
        elif i == y:
            print("War")
else:
    print("War")

# coding: utf-8
 
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))
xn.append(x)
ym.append(y)
flag = 0
 
if x < y:
    for i in range(min(xn), max(ym)+1):
        if max(xn) < i and min(ym)>=i:
            print("No War")
            flag = 1
    if flag == 0:
        print("War")
else:
    print("War")

# coding: utf-8
 
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))
flag = 0

if x < y:
    for i in range(x+1, y+1):
        if max(xn) < i and min(ym)>=i:
            print("No War")
            flag = 1
        elif flag == 0 and i == y:
            print("War")
else:
    print("War")

# coding: utf-8
 
a, b, c = map(int, input().split())
 
x = a*10 + b
y = b*10 + c
z = c*10 + a
 
if x >= y and x >= z:
    print(x + c)
elif y >= x and y >= z:
    print(y + a)
else:
    print(z + b)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
l = map(int,input().split())
l.sort()
print(10*l[0] + l[1] + l[2])

l = list(map(int,input().split()))
l.sort()
print(10*l[2] + l[1] + l[0])

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
#print(N,M,X,Y,x,y)
x.append(X)
y.append(Y)
if(max(x)>min(y)):
  print('War')
else:
  print('Np War')



l=sorted(list(map(int,input().split())))
print(l[2]*10+l[1]+l[0])

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
l=list(map(int,input().split()))
l2=sort(l)
print(10*l2[2]+l2[1]+l2[0])

l=list(map(int,input().split()))
l2=sorted(l)
print(10*l2[2]+l2[1]+l2[0])

Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a,b,c = map(int,input().split())
list = [a,b,c]
list1 = sorted(list)
d = list1[-1] + list1[-2]
num = int(d) + int(list1[0])
print(num)

a,b,c = map(int,input().split())
list = [a,b,c]
list1 = sorted(list)
d = str(list1[-1]) + str(list1[-2])
num = int(d) + list1[0]
print(num)

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
a,b,c = map(int,input().split())
d = max(a,b,c)
print(9 * d + sum(a,b,c))

a, b, c = map(int, (input().split()))
d = max(a,b,c)
print(d * 9 + a + b + c)


Verdicts: Runtime Error

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
N=sorted(list(map(int,input().split())))
print(N[0]*10+N[1]+N[2])

N=list(map(int,input().split()))
N.sort(reverse=True)
print(N[0]*10+N[1]+N[2])

Verdicts: Wrong Answer

Accepted
Problem: You have decided to give an allowance to your child depending on the outcome of the game that he will play now.  The game is played as follows:    * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it.   * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)   * Then, the amount of the allowance will be equal to the resulting value of the formula.  Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Submission attempts (in order):
x = split(input()," ")
for i in range(len(x)):
  if int(x[i]) >= int(x[i-1]) and int(x[i]) >= int(x[i+1]):
    print (10*int(x[i])+int(x[i-1])+int(x[i+1]))

a,b,c = sorted(map(int, input().split()))
print(a+b+c*10)

Verdicts: Runtime Error

Accepted