Problem:


Score : 100 points

Problem Statement

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.

Constraints

All values in input are integers.

1 \leq A, B, C \leq 9

Input

Input is given from Standard Input in the following format:

A B C

Output

Print the maximum possible amount of the allowance.

Sample Input 1

1 5 2

Sample Output 1

53

The amount of the allowance will be 53 when the panels are arranged as 52+1, and this is the maximum possible amount.

Sample Input 2

9 9 9

Sample Output 2

108

Sample Input 3

6 6 7

Sample Output 3

82



Sample input:
1 5 2


Sample output:
53

Submission status: Runtime Error

Solution code:
S=input()
T=input()

length=len(S)
Smarker=[0]*length
Tmarker=[0]*length

for num1 in range(length):
    for num2 in range(length-num1-1):
        if S[num1]==S[num1+1+num2]:
            Smarker[num1]+=1
        if T[num1]==T[num1+1+num2]:
            Tmarker[num1]+=1

Sresult=0
Tresult=0

for num in range(length):
    if Smarker[num]==0:
        Sresult+=1
    if Tmarker[num]==0:
        Tresult+=1
    if Smarker[num]==1:
        Sresult+=10
    if Tmarker[num]==1:
        Tresult+=10

if Sresult==Tresult:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import collections,math,sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N,M = LI()
ans = 1
def prime_factor(num):
    prime_factor = collections.defaultdict(int)
    for i in range(2,int(num**0.5)+1):
        while num%i==0:
            prime_factor[i] += 1
            num //= i
    if num>1:
        prime_factor[num]=1
    return prime_factor
for v in prime_factor(M).values():
    ans *= math.factorial(v+N-1)//math.factorial(v)//math.factorial(N-1)
    ans %= 10**9+7
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c=map(str,input().split())
printmax((int(a+b)+int(c),int(a)+int(b+c)))

Submission status: Runtime Error

Solution code:
a = sorted(input().split() ,reverse=True)
print(int(a[0]+a[1

Submission status: Runtime Error

Solution code:
import sys
n,m,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

d=min(y)-max(x)
if d<=0:
    print("War")
    sys.exit()
else:
    for i in range(d+1):
        Z=X+i
        if Z<=X or Z>Y:
            print("War")
            sys.exit()
print("No War")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s =input()
t =input()
n = len(s)
d = {}
used = set([])

for i in range(n):
  if s[i] not in d:
    if t[i] in used:
      print('No')
      continue
    d[s[i]] = t[i]
    used.add(t[i])
  else:
    if d[s[i]] == t[i]:
      continue
    else:
      print('No')
      break
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
A, B, C = sorted(map(int, input().split()))
print(10*c +a +b)

Submission status: Runtime Error

Solution code:
def LI(): return list(map(int, input().split()))


A,B,C = LI()
max_value = max([A+10+b+C,A+B*10+C,A+B+C*10])

print(max_value)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print(max(a, b, c) * 9 + sum(a, b, c))

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')

def solve():
    S = list(input())
    T = list(input())

    ds = {}
    dt = {}
    ids = ''
    idt = ''
    cids = 0
    cidt = 0
    for i in range(len(S)):
        # S
        s = S[i]
        if s in ds:     # 出現済みの文字なら、その文字のIDを追加する
            idss = ds[s]
            ids = ids + str(idss)
        else:           # 新たに出現した文字なら、新しいIDを追加し、メモしておく
            cids += 1
            ds[s] = cids
            ids = ids + str(cids)

        # T
        t = T[i]
        if t in dt:
            idst = dt[t]
            idt = idt + str(idst)
        else:
            cidt += 1
            dt[t] = cidt
            idt = idt + str(cidt)

        if ids != idt:
            print('No')
            return

    print('Yes')



if __name__ == '__main__':
    solve()

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print(max(a, b, c)*9 + sum(a, b, c))

Submission status: Runtime Error

Solution code:
s1 = input()
s2 = input()
dict_s1 = {}
dict_s2 = {}
for i in range(len(s1)):
    if s1[i] not in dict_s1:
        dict_s1[s1[i]] = s2[i]
    else:
        if dict_s1[s1[i]] != s2[i]:
            print('No')
            quit()
    if s2[i] not in dict_s2:
        dict_s2[s2[i]] = s1[i]
    else:
        if dict_s2[s2[i]] != s1[i]:
            print('No')
            quit()
print('Yes')

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
L[a,b,c]
L.sort()
print(L[2]*10+L[1]+L[0])

Submission status: Runtime Error

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

print(9*max(a+b+c)+a+b+c)

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
if B >= A and B >= C:
  print(B*10+C+A)
if C >= A and C >= B:
  print(C*10+A+B)
if A >= B and A >= C:
  print(A:10+B+C)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

#110_c

S = input()
T = input()

combination = []
for i, j in zip(S,T):
    combination.append([i,j])

set_S = []
set_T = []

for i,j in list(map(list, set(map(tuple, combination)))):
    set_S.append(i)
    set_T.append(j)

if len(set_S) == len(set(set_S))and len(set_T) == len(set(set_T)):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S=list(input().split())
AS=sorted(S)
print(int((S[2]+S[1])+int(S[0]))

Submission status: Runtime Error

Solution code:
Not found

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
L = [a,b,c]
M = L.sorted()
print(int(str(M[2])+str(M[1]))+int(M[0]))

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
L = [a,b,c]
M = L.sorted()
ptint(int(str(M[2])+str(M[1]))+int(M[0]))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
mod = 10 ** 9 + 7
mod2 = 2**61+1
from collections import deque
import heapq
from bisect import bisect_left, insort_left, bisect_right

def iip(listed=True):
    ret = [int(i) for i in input().split()]
    if len(ret) == 1 and not listed:
        return ret[0]
    return ret

def iip_ord():
    return [ord(i) - ord("a") for i in input()]


def main():
    ans = solve()
    if ans is not None:
        print(ans)

def solve():
    #N, M = iip(False)
    S = input()
    T = input()

    d1 = {}
    d2 = {}
    for s, t in zip(S, T):
        if t not in d1:
            d1[t] = s
            d2[s] = t
        if s not in d2:
            d2[s] = t
            d1[t] = s

            #print(t, t, d[s])
        if d1[t] != s or d2[s] != t:
            print("No")
            return
    print("Yes")



#####################################################ライブラリ集ここから

def fprint(s):
    for i in s:
        print(i)

def split_print_space(s):
    print(" ".join([str(i) for i in s]))


def split_print_enter(s):
    print("\n".join([str(i) for i in s]))


def koenai_saidai_x_index(sorted_list, n):
    l = 0
    r = len(sorted_list)
    if len(sorted_list) == 0:
        return False
    if sorted_list[0] > n:
        return False

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] == n:
            return x
        elif sorted_list[x] > n:
            r = x
        else:
            l = x
    return l


def searchsorted(sorted_list, n, side):
    if side not in ["right", "left"]:
        raise Exception("sideはrightかleftで指定してください")

    l = 0
    r = len(sorted_list)

    if n > sorted_list[-1]:
        # print(sorted_list)
        return len(sorted_list)
    if n < sorted_list[0]:
        return 0

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] > n:
            r = x
        elif sorted_list[x] < n:
            l = x
        else:
            if side == "left":
                r = x
            elif side == "right":
                l = x

    if side == "left":
        if sorted_list[l] == n:
            return r - 1
        else:
            return r

    if side == "right":
        if sorted_list[l] == n:
            return l + 1
        else:
            return l


def soinsuu_bunkai(n):
    ret = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            ret.append(i)
        if i > n:
            break
    if n != 1:
        ret.append(n)
    return ret


def conbination(n, r, mod, test=False):
    if n <= 0:
        return 0
    if r == 0:
        return 1
    if r < 0:
        return 0
    if r == 1:
        return n
    ret = 1
    for i in range(n - r + 1, n + 1):
        ret *= i
        ret = ret % mod

    bunbo = 1
    for i in range(1, r + 1):
        bunbo *= i
        bunbo = bunbo % mod

    ret = (ret * inv(bunbo, mod)) % mod
    if test:
        # print(f"{n}C{r} = {ret}")
        pass
    return ret


def inv(n, mod):
    return power(n, mod - 2)


def power(n, p, mod_= mod):
    if p == 0:
        return 1
    if p % 2 == 0:
        return (power(n, p // 2, mod_) ** 2) % mod_
    if p % 2 == 1:
        return (n * power(n, p - 1, mod_)) % mod_


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
l = list(map(int, input.split()))
print(sum(l)+max(l)*9)

Submission status: Runtime Error

Solution code:
abc = list(map(int,input()))
abc.sort()
abc[2] *= 10
print(sum(abc))

Submission status: Runtime Error

Solution code:
k=list(map(str,input().split()))
print(int(max(k)+max(k)[1])+int(min(k)))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
print(a+b+c+9 * max(a, b, c))

Submission status: Runtime Error

Solution code:
a,b,c=input().split()

print(max(int(a+b)+int(c),int(b+a)+int(c),int(b+c)+int(a),int(c+b)+int(a),int(c+a)+int(b).int(a+c)+int(b)))

Submission status: Runtime Error

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

print(max(int(str(a+b)+c,str(b+a)+c,str(b+c)+a,str(c+b)+a,str(c+a)+b.str(a+c)+b)))

Submission status: Runtime Error

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

print(max(str(a+b)+c,str(b+a)+c,str(b+c)+a,str(c+b)+a,str(c+a)+b.str(a+c)+b))

Submission status: Runtime Error

Solution code:
#abc110 a
num=list(map(int,input().split()))
l=max(num)
s=min(num)
m=sum(l)-l-s
ans=int(str(l)+str(m))+s
print(ans)

Submission status: Runtime Error

Solution code:
x=list(map(int,input().split))
x.sort()
print(x[-1]*10+x[-2]+x[-3])

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>

#define ll long long
#define fornum(A,B,C) for(A=B;A<C;++A)
#define pii pair<int,int>
#define pll pair<ll,ll>

using namespace std;

/////////////////////////////////////////////////////
ll A[5];
ll i, j, k;
int main(){
    fornum(i,0,3){
        scanf("%lld", &A[i]);
    }    
    sort(A,A+3);
    printf("%lld", A[2] * 10 + A[1] + A[0]);
    return 0;
}

Submission status: Runtime Error

Solution code:
A = list(map(int, input().split()))
A.sort()
ans(A[0]+A[1]+10*A[2])

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split(' ')))

a.sort(reverse = True)

print(int(a[0:2]) + int(a[2]))

Submission status: Runtime Error

Solution code:
a = list(map(int,input()))

print(max(a) * 9 + sum(a))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,raw_input().split())
max_num=a
if max_num < b
    max_num=b
if max_num < c
    max_num=c
print max_num*9+(a+b+c)

Submission status: Runtime Error

Solution code:
S = str(input())
T = str(input())
S_d = {}
T_d = {}
for i,j in zip(S,T):
    if i in S_d and j in T_d:
        if S_d[i] == T_d[j]:
            pass
        else:
            print("No")
            break
    else:
        if i in S_d or j in T_d:
            print("No")
            break
        else:
            S_d[i] = S.count(S)
            T_d[j] = T.count(T)
        
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
s=sorted(list(map(int,input().input())))[::-1]
print(s[0]*10+s[1]+s[2])

Submission status: Runtime Error

Solution code:
from operator import itemgetter

S = list(input())
T = list(input())

G = []
G.append(["zz","zz"])
for i in range(len(S)):
    G.append([S[i],T[i]])


cnt = 0
for i in range(len(G)-1):
    G = sorted(G, key=itemgetter(0))
    if G[i+1][0] == G[i][0]:
        if G[i+1][1] != G[i][1]:
            cnt +=1
            break
    G = sorted(G, key=itemgetter(1))
    if G[i+1][1] == G[i][1]:
        if G[i+1][0] != G[i][0]:
            cnt +=1
            break
print('Yes' if cnt == 0 else 'No')

Submission status: Runtime Error

Solution code:
N=[int(input()) for i in range(3)]
N.sort (reverse=True)
ans1=10*N[0]+N[1]
ans2=N[-1]
print(ans1+ans2)

Submission status: Runtime Error

Solution code:
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

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

Submission status: Runtime Error

Solution code:
l = sorted(list(str,input().split()))
m = int(l[0]) + int(l[2]+l[1])
print(m)

Submission status: Runtime Error

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

print(max(a,b,c)*9+sum(a,b,c)

Submission status: Runtime Error

Solution code:
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

N,M=map(int,input().split())
if M==1:
  print(1)
else:
  primes0=prime_factorize(M)
  keys=list(set(primes0))
  primes={}
  for i in range(len(keys)):
    k=keys[i]
    primes[k]=0
    for j in range(len(primes0)):
      if primes0[j]==k:
        primes[k]+=1

  def cmb(n, k, mod, fac, ifac): #calc nCk under mod
      if n < k or n < 0 or k < 0:
          return 0
      else: 
          k = min(k, n-k)
          return fac[n] * ifac[k] * ifac[n-k] % mod

  def make_tables(mod, n): #Make factorial and inverse tables under mod 
      fac = [1, 1] # factorial table
      ifac = [1, 1] #factorial of inverse table
      inverse = [0, 1] #inverse

      for i in range(2, n+1):
          fac.append((fac[-1] * i) % mod)
          inverse.append((-inverse[mod % i] * (mod//i)) % mod)
          ifac.append((ifac[-1] * inverse[-1]) % mod)
      return fac, ifac

  mod=10**9+7
  fac,ifac = make_tables(mod,N*2)
  ans=1
  for i in range(len(keys)):
    ans*=cmb(N+primes[keys[i]]-1, primes[keys[i]], mod, fac, ifac)
    ans%=mod
  print(ans)

Submission status: Runtime Error

Solution code:
A,B,C = map(int, input().split())
r = max(A,B,C)*9 + sum(A, B, C)
print(int(r))

Submission status: Runtime Error

Solution code:
a=[int(i) for i in input().split()]
a.sort()[::-1]
x,y,z=a
print(x*10+y+z)

Submission status: Runtime Error

Solution code:
a=list(input().split())
a=sorted(a)
print(int(a[2])+int(a[0]+a[1])))

Submission status: Runtime Error

Solution code:
a=list(input().split()))
a=sorted(a)
print(int(a[2])+int(a[0]+a[1])))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print(max(a,b,c)*10 + sorted(nums)[-2] + min(a,b,c))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
lst = list(map(int,input().split()))
lst_2 = []
for i in range(len(lst)):
    lstt = lst
    x = lstt[i]
    del lstt[i]
    num = int(x) + int("".join(lstt))
    lst_2.append(num)
print(int(max(lst_2)))

Submission status: Runtime Error

Solution code:
lst = list(map(int,input().split()))
lst_2 = []
for i in range(len(lst)):
    lstt = lst
    x = lstt[i]
    del lstt[i]
    num = x + int("".join(lstt))
    lst_2.append(num)
print(max(lst_2))

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
x = [sorted(a, b, c)]

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

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
x = [sorted(a, b, c)]

print(x[3]*10 + x[1] + x[2])

Submission status: Runtime Error

Solution code:
A,B,C = list(map(int,input()))
if A >= B and B >= C:
  print(A*10 + B+C)
elif B >= C and C >=A:
  print(B*10 + C+A)
elif C >= A and A >= B:
  print(C*10 + A+B)

Submission status: Runtime Error

Solution code:
a,b,c=map(int, input())

A=10*a+b+c
B=a+10*b+c
print(max(A,B))

Submission status: Runtime Error

Solution code:
num=list(map(int,input()))
num.sort(reverse=True)
print(num[0]*10+num[1]+num[2])

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
NMXY = list(map(int,input().split()))
N=NMXY[0]
M=NMXY[1]
X=NMXY[2]
Y=NMXY[3]
x=list(map(int,input().split()))
y=list(map(int,input().split()))
flag1=[]
flag2=[]

Z=list(range(X+1,Y))

for k in Z:
    flag1.append(all([i<k for i in x]))
    flag2.append(all([j>=k for j in y]))
print(flag1)
print(flag2)
if any(flag1) and any(flag2):
    print('No War')
else:
    print('War')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print(max(int(str(a)+str(b))+c,int(str(a)+str(c))+b,int(str(b)+str(c))+a,int(str(b)+str(a)+c,int(str(c)+str(a)+b,int(str(c)+str(b)+a))

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
 
int main() {
  vector<int> a(3);
  cin >> a[0] >> a[1] >> a[2];
  sort(a.begin(), a.end());
  int ans;
  ans = a[0] + a[1] + a[2]*10;
  cout << ans << "\n";
}

Submission status: Runtime Error

Solution code:
a,b,c=sorted(map(int,input()))
print(10*c+b+a)

Submission status: Runtime Error

Solution code:
ln = []
ln.append(map(int, input().split()))
print(max(ln) * 10 + sum(ln) - max(ln))

Submission status: Runtime Error

Solution code:
A,B,C=(map(int,input().split())).sort()
print(10*C+B+A)

Submission status: Runtime Error

Solution code:
def main():
    ABC = [int(s) for s in input().split()]
    sorted = ABC.sort()
    result = int(str(sorted[0])+str(sorted[1])) + sorted[2]
    print(result)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
x=[a,b,c]
x.sort()
print(int((x[2]+x[1])+x[0])

Submission status: Runtime Error

Solution code:
a,b,c = [input() for i in range(3)]
a.sort()
print(int((a[2]+a[1])+a[0])

Submission status: Runtime Error

Solution code:
a = [input() for i in range(3)]
a.sort()
print(int((a[2]+a[1])+a[0])

Submission status: Runtime Error

Solution code:
a=[int(input()) for i in range(3)]
a.sort()
print((a[2]*10)+a[1]+a[0])

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a = LI()
    a.sort()
    a, b, c = a
    print(int(str(c)+str(b))+a)
    return

#B
def B():
    _, _, X, Y = LI()
    x = LI()
    y = LI()
    x.append(X)
    y.append(Y)
    x.sort()
    y.sort()
    print("No " * (x[-1] < y[0]) + "War")
    return

#C
def C():
    s = S()
    t = S()
    ds = defaultdict(int)
    dt = defaultdict(int)
    for i in range(len(s)):
        if ds[s[i]]:
            if ds[s[i]] == ord(t[i]):
                continue
            print("No")
            return
        if dt[t[i]]:
            if dt[t[i]] == ord(s[i]):
                continue
            print("No")
            return
        ds[s[i]] = ord(t[i])
        dt[t[i]] = ord(s[i])
    print("Yes")
    return

#D
def D():
    n, m = LI()
    def power_func(a, b, mod):
        """ a^b mod p を求める """
        """ bを2進数分解して高速累乗 """

        if b == 0: return 1
        if b % 2 == 0:
            d = power_func(a, b // 2, mod)
            return d * d % mod
        if b % 2 == 1:
            return (a * power_func(a, b - 1, mod)) % mod

    def combination_mod(n, k, mod):
        """ power_funcを用いて(nCk) mod p を求める """ 
        """ nCk = n!/((n-k)!k!)を使用 """
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        a = factorial[n] % mod
        b = factorial[k] % mod
        c = factorial[n - k] % mod
        return (a * power_func(b, mod - 2, mod) * power_func(c, mod - 2, mod)) % mod

    factorial = [i for i in range(10 ** 6)]
    factorial[0] = 1
    for i in range(1, 10 ** 6):
        factorial[i] *= factorial[i - 1]
        factorial[i] %= mod
    lis = []
    for i in range(2, 10 ** 6):
        tmp = 0
        while m % i == 0:
            tmp += 1
            m //= i
        if tmp:
            lis.append(tmp)
    ans = 1
    for a in lis:
        a = combination_mod(a + n - 1, a, mod)
        ans *= a
        ans %= mod
    print(ans % mod)

    return

#Solve
if __name__ == '__main__':
    D()

Submission status: Runtime Error

Solution code:
s = [int x for x in input().split()]
max_int = s.pop(s.index(max(s)))
print(max_int * 10 + sum(s))

Submission status: Runtime Error

Solution code:
import math

N, M = map(int, input().split())
MOD = 10**9+7

def trial_division(n):
  #素因数を格納するリスト
  factor = []
  #2から√n以下の数字で割っていく
  tmp = int(math.sqrt(n)) + 1
  for num in range(2,tmp):
    cnt = 0
    while n % num == 0:
      n //= num
      cnt += 1 
    if cnt != 0:
      factor.append(cnt)
  #リストが空ならそれは素数
  if not factor:
    return factor
  else:
    if n != 1:
      factor.append(1)
    return factor

from operator import mul
from functools import reduce

def cmb(n,r):
  r = min(n-r,r)
  if r == 0: return 1
  over = reduce(mul, range(n, n - r, -1))
  under = reduce(mul, range(1,r + 1))
  return over // under

ans = 1
cnts = trial_division(M)
for cnt in cnts:
  ans = ans * (cmb(cnt+N-1, cnt))%MOD

print(cnts)
print(ans)

Submission status: Runtime Error

Solution code:
A,B,C = map(int.input().split())
print(max(A+B,B+C,C+A))

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
b = a.pop(max(a))
print(b*10+sum(a))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input())
print(9*max(a,b,c)+a+b+c)

Submission status: Runtime Error

Solution code:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
x.append(X)
y.append(Y)
if max(x) < min(y):
    print('No War')
else:
    print('War')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = [input(i) for i in input().split()]
n.sort(reverse=True)
print(n[0]*10*n[1]+n[2])

Submission status: Runtime Error

Solution code:
n = list(map(int, input().split()))
n.reverse()
print('n[0]n[1]' +[2])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c=map(int.input().split())
l=sorted([a,b,c])
print(l[2]*10 + l[1] + l[0])

Submission status: Runtime Error

Solution code:
l = map(int, input().split())
l.sort()

print(l[2] * 10 + sum(l[:2]))

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
print(sum(A, B, C) - min(A, B, C))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(input().split()).sort()
print(int(a[0])*10+int(a[1])+int(a[2]))

Submission status: Runtime Error

Solution code:
a = list(input().split()).sort()
print(a[0]*10+a[1]+a[2])

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a , b , c = soted(map(int, input().split()))
print(c * 10 + b + a)

Submission status: Runtime Error

Solution code:
a , b , c = soted(map(int, input().split()))
print(a * 10 + b + c)

Submission status: Runtime Error

Solution code:
*A,_= map(int, input().split())

A.sort(reverse=True)

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

Submission status: Runtime Error

Solution code:
import collections
s=input()
t=input()
s = collections.Count(s)
t = collections.Count(t)
if sorted(s.values()) == sorted(t.values()):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
li = map(int(input().split()))
li.sort()
print(li[0]*10+li[1]+li[2])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input()split())

s = sorted.[a, b, c]

print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print(10*a+b+c if 10*a+b+c a+10*b+c else a+10*b+c)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print(10a+b if 10a+b>=10b+c else 10b+c)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print(max(a,b,c)*9+a+b+C)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
 = list(map(int, input().split()))
a = a.sort
b = [str(a[2]), str(a[1])]
c = ''.join(b)
print(int(c) + a[0])

Submission status: Runtime Error

Solution code:
a,b,c=sorted(map(int,input()))
print(10*c+a+b)

Submission status: Runtime Error

Solution code:
S = sorted(input(), reverse=False)
print(int(S[0:2])+int(S[2]))

Submission status: Runtime Error

Solution code:
import sys

def odd_def(num):
    if num % 2 == 0:
        return False
    else:
        return True

def main():
    a,b = map(int, input().split())
    for i in range(1,4):
        mal = a*b*c
        if odd_def(mal):
            print('Yes')
            sys.exit()
    print('No')


if __name__ == '__main__' :
    main()

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
max(10 * A + B + C, A + 10*B + C,　A + B + 10 * C)

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split()
max(10*A + B + C,A+10*B+C,A+B+10*C)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
Tmp = []
Tmp = input().rstrip().split(',')

Ans = []

nA = int(Tmp[0])
Ans.append(nA)

nB = int(Tmp[1])
Ans.append(nB)
  
nC = int(Tmp[2])
Ans.append(nC)

Ans.sort(reverse='True')

nAns = Ans[0]*10+Ans[1]+Ans[2]
print(nAns)

Submission status: Runtime Error

Solution code:
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])