Problem:


Score : 200 points

Problem Statement

Given are 1-digit positive integers a and b. Consider these two strings: the concatenation of b copies of the digit a, and the concatenation of a copies of the digit b. Which of these is lexicographically smaller?

Constraints

1 \leq a \leq 9

1 \leq b \leq 9

a and b are integers.

Input

Input is given from Standard Input in the following format:

a b

Output

Print the lexicographically smaller of the two strings. (If the two strings are equal, print one of them.)

Sample Input 1

4 3

Sample Output 1

3333

We have two strings 444 and 3333. Between them, 3333 is the lexicographically smaller.

Sample Input 2

7 7

Sample Output 2

7777777



Sample input:
4 3


Sample output:
3333

Submission status: Accepted

Solution code:
n,m = map(str,input().split())
print(min(int(n)*m,int(m)*n))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    if A > B:
        return str(B) * A
    else:
        return str(A) *B


def main():
    A, B = read_int_n()
    print(slv(A, B))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

a, b = input().split()

x = a * int(b)
y = b * int(a)
if x <= y:
    print(x)
else:
    print(y)

Submission status: Accepted

Solution code:
[a,b] = list(map(int,input().split()))
M = min(a,b)
N = max(a,b)
output = ""
for i in range(N):
    output += str(M)
print(output)

Submission status: Accepted

Solution code:
import math
import itertools
import fractions
import heapq
import collections
import bisect
import sys

sys.setrecursionlimit(10**9)
mod = 998244353
inf = 10**20

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

a,b = LI()
print(str(min(a,b))*max(a,b))

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
if(n>m):print(str(m)*n)
else:print(str(n)*m)

Submission status: Accepted

Solution code:
a, b = input().split()
ai = int(a)
bi = int(b)

print(min((a * bi, b * ai)))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
a_b = str(a) * b
b_a = str(b) * a
if a_b > b_a:
    print(b_a)
else:
    print(a_b)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(a: int, b: int):
    print(min(str(a) * b, str(b) * a))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    solve(a, b)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()
x = a*int(b)
y = b*int(a)
print(x if x<y else y)

Submission status: Accepted

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

l = [a*int(b),b*int(a)]
l.sort()
print(l[0])

Submission status: Accepted

Solution code:
# coding: utf-8
a,b=map(int,input().split())
ans=""

for i in range(max(a,b)):
    ans+="{}".format(min(a,b))

print(ans)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
ab = str(a)*b
ba = str(b)*a
print(min(ab,ba))

Submission status: Accepted

Solution code:
a, b = input().split()
c = a * int(b)
d = b * int(a)
if c < d:
    print(c)
else:
    print(d)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
t = sorted([str(a)*b,str(b)*a])
print(t[0])

Submission status: Accepted

Solution code:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y

A,B=input().split()
Aint = int(A)
Bint = int(B)
V=[A*Bint,B*Aint]
V.sort()
print(V[0])

Submission status: Accepted

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

print(min(a*int(b), b*int(a)))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c=[str(min(a,b))]*max(a,b)

print(''.join(c))

Submission status: Accepted

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

if a>b:
    for i in range(a):
        print(b, end="")
else:
    for i in range(b):
        print(a, end="")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a<b:
    for i in range(b):
        print(a,end="")
else:
    for i in range(a):
        print(b,end="")
print("")

Submission status: Accepted

Solution code:
def main():
    a,b = map(int,input().split())
    ans1 = str(a)*b
    ans2 = str(b)*a
    ls = [ans1,ans2]
    ls = sorted(ls)
    print(ls[0])
if __name__ == '__main__':
    main()

Submission status: Accepted

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

ab = a * int(b)
ba = b * int(a)

if ab <= ba:
	print(ab)
else:
	print(ba)

Submission status: Accepted

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

x = min(a, b)
y = max(a, b)
print(str(x) * y)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import string
import queue
import copy
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
 
def inp(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    return [list(map(int, input().split())) for _ in range(n)]
 
def main():
    a,b = inpm()
    if b>a:
        a,b = b,a
    ans = []
    for i in range(a):
        ans.append(str(b))
    print(''.join(ans))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
tmp1 = str(a) * b
tmp2 = str(b) * a
print(min(tmp1, tmp2))

Submission status: Accepted

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

x, y = sorted((a, b))

print(str(x) * y)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
a,b=map(int,input().split())
if a>b:
    a,b=b,a
ans=""
for i in range(b):
    ans+=(str(a))
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    a, b = rl()
    ab = a*int(b)
    ba = b*int(a)
    ans = sorted([ab, ba])[0]
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

if a <= b:
    ans = [a] * b
else:
    ans = [b] * a

print ("".join(map(str,ans)))

Submission status: Accepted

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

li = []
s = str(a) * b
t = str(b) * a
li.append(s)
li.append(t)
li.sort()
print(li[0])

Submission status: Accepted

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

print(str(a) * b)

Submission status: Accepted

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

if a>b:
    print(str(b)*a)
else:
    print(str(a)*b)

Submission status: Accepted

Solution code:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()

if B < A:
    A, B = B, A

print(str(A) * B)

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
if n > m:
    print(str(m) * n)
else:
    print(str(n) * m)

Submission status: Accepted

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

ab = a * int(b)
ba = b * int(a)

if(int(a) > int(b)):
    print(ba)
else:
    print(ab)

Submission status: Accepted

Solution code:
A, B = input().split()

answer = [A * int(B), B * int(A)]
answer.sort()

print(answer[0])

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a>=b:
    print(int(str(b)*a))
else:
    print(int(str(a)*b))

Submission status: Accepted

Solution code:
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter
from math import factorial

sys.setrecursionlimit(10**7)
N, M = map(int, input().split())

if N<M:
    print(str(N)*M)
else:
    print(str(M)*N)

Submission status: Accepted

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

if (b<=a):
    print(str(b)*a)
else:
    print(str(a)*b)

Submission status: Accepted

Solution code:
a,b = input().split()
a2 = a*int(b)
b2 = b*int(a)
print(min(a2,b2))

Submission status: Accepted

Solution code:
a_arr = [int(x) for x in input().split()]

a_arr.sort()

ans = 0
for _ in range(a_arr[1]):
    ans = 10*ans+a_arr[0]
print(ans)

Submission status: Accepted

Solution code:
a, b = input().split()
s1 = a * int(b)
s2 = b * int(a)
print(s1 if s1 < s2 else s2)

Submission status: Accepted

Solution code:
a,b = input().split()
print(min(a*int(b),b*int(a)))

Submission status: Accepted

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

A = a * int(b)
B = b * int(a)

ans = A if A <= B else B

print(int(ans))

Submission status: Accepted

Solution code:
a,b=input().split()
x=sorted([a*int(b),b*int(a)])
print(x[0])

Submission status: Accepted

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

if a > b:
    ans = [b]*a
    print(*ans,sep='')
else:
    ans = [a]*b
    print(*ans,sep='')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
AB = str(a) * b
BA = str(b) * a
print(AB if AB < BA else BA)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
T=''
if A>=B:
    for i in range(A):
       T+=str(B)
else:
    for i in range(B):
       T+=str(A)

print(T)

Submission status: Accepted

Solution code:
a,b =map(int, input().split())
A = (str(b)*a)
B = (str(a)*b)
if A < B:
    print(A)
else:
    print(B)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a<b:
    print(str(a)*b)
else:
    print(str(b)*a)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
l=[]
for i in range(max(a,b)):
  l.append(str(min(a,b)))
print(''.join(l))

Submission status: Accepted

Solution code:
def main():

    a, b = input().split()
    aa = a*int(b)
    bb = b*int(a)

    if aa < bb:
        return aa
    return bb

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(min(str(a)*b,str(b)*a))

Submission status: Accepted

Solution code:

#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

def main():
    n,m = mi()
    mm = min(n,m)
    mn = max(n,m)

    s = ''
    for i in range(mn):
        s+=str(mm)
    print(s)

main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
a, b = map(int, input().split())
s = str(a) * b
t = str(b) * a
x = [s, t]
x.sort()
print(x[0])

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

a, b = map(int, read().split())

ab = str(a) * b
ba = str(b) * a

print(min(ab, ba))

Submission status: Accepted

Solution code:
from operator import itemgetter
from math import log,ceil

def main():
    tmp = []
    a,b = input().split()
    tmp.append(a*int(b))
    tmp.append(b*int(a))
    tmp.sort()
    print(tmp[0])
    return


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
l=sorted([str(a)*b,str(b)*a])
print(l[0])

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
tmp = ''
tmp2 = ''
for i in range(b):
    tmp += str(a)
for i in range(a):
    tmp2 += str(b)
arr = [tmp,tmp2]
arr.sort()
print(arr[0])

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

a,b = input().split()

aa = "".join([a]*int(b))
bb = "".join([b]*int(a))


print(min(aa,bb))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
[print(min(a,b),end='') for i in range(max(a,b))]

Submission status: Accepted

Solution code:
a, b = map(int, (input().split()))
print(str(a) * b if a < b else str(b) * a)

Submission status: Accepted

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

if a<=b:
    print(str(a)*b)
else:
    print(str(b)*a)

Submission status: Accepted

Solution code:
a,b= input().split()
ans = [a*int(b),b*int(a)]
ans.sort()
print(ans[0])

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from bisect import bisect_right, bisect_left
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from copy import deepcopy
from math import factorial, ceil, floor, gamma, log
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = float('INF')
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7


a, b = sorted(LS())
print(a * int(b))

Submission status: Accepted

Solution code:
from sys import stdin

a,b = [x for x in stdin.readline().rstrip().split()]

li = [a*int(b),b*int(a)]
li.sort()
print(li[0])

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
x = sorted([str(a)*b, str(b)*a])
print(x[0])

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
A=str(a)*b
B=str(b)*a
if a>=b:
    print(B)
else:
    print(A)

Submission status: Accepted

Solution code:
a,b = [list(map(int, s.split())) for s in open(0)][0]
l = min(a,b)
h = max(a,b)
ans = str(l) * h
print(ans)

Submission status: Accepted

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

sa = a*int(b)
sb = b*int(a)

print(min(sa,sb))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
aa = str(a)*b
bb = str(b)*a
print(sorted([aa, bb])[0])

Submission status: Accepted

Solution code:
def main():
    a, b = (i for i in input().split())
    s1 = a * int(b)
    s2 = b * int(a)
    if s1 < s2:
        print(s1)
    else:
        print(s2)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

A = str(a)*b
B = str(b)*a

s = [A, B]
s = sorted(s)
print(s[0])

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a <= b:
    hoge = [a for i in range(b)]
    print(*hoge, sep = "")
else:
    hoge = [b for i in range(a)]
    print(*hoge, sep = "")

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

a,b=MAP()


a,b=min(a,b),max(a,b)
print(str(a)*b)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a,b = LI()

ans1 = ''
ans2 = ''
for i in range(b):
    ans1 += str(a)
for i in range(a):
    ans2 += str(b)

if ans1 < ans2:
    print(ans1)
else:
    print(ans2)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a<=b:
	print(str(a)*b)
else:
	print(str(b)*a)

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

a,b = get_nums_l()

x = str(a) * b
y = str(b) * a

if x < y:
    print(x)
else:
    print(y)

Submission status: Accepted

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

x1 = a * int(b)
x2 = b * int(a)

if x1 > x2:
    print(x2)
else:
    print(x1)

Submission status: Accepted

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

if a > b:
    for i in range(a):
        print(b, end = "")
else:
    for i in range(b):
        print(a, end= "")

Submission status: Accepted

Solution code:
def examA():
    N, M = LI()
    if N==M:
        print("Yes")
    else:
        print("No")
    return

def examB():
    A, B = LI()
    if A>B:
        ans = str(B)*A
    else:
        ans = str(A)*B
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
alphabet = [chr(ord('a') + i) for i in range(26)]

if __name__ == '__main__':
    examB()

"""

"""

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
a = str(n) * m
b = str(m) * n
if a > b:
    print(b)
else:
    print(a)

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    word = [str(a) * b, str(b) * a]
    word.sort()
    print(word[0])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a>b:
    print(str(b)*a)
elif a<b:
    print(str(a)*b)
else:
    print(str(a)*a)

Submission status: Accepted

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

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

print(str(m) * M)

Submission status: Accepted

Solution code:
a,b=input().split()
aa=a*int(b)
bb=b*int(a)
print(sorted([aa,bb])[0])

Submission status: Accepted

Solution code:
import sys
a, b = [int(i) for i in sys.stdin.readline().split()]
if a == b:
    print(str(a) * b)
elif a < b:
    print(str(a) * b)
else:
    print(str(b) * a)

Submission status: Accepted

Solution code:
#%%
n, m = map(int, input().split())
a = min(n, m)
b = max(n, m)
ans = ''
for i in range(b):
    ans += str(a)
print(ans)

Submission status: Accepted

Solution code:
import collections
import math
import operator as op
from functools import reduce
import numpy as np
import math
import bisect
import heapq


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd(a, b)


def get_inputs(cast_func=None):
    if cast_func is None:
        return input().split()
    else:
        return list(map(cast_func, input().split()))


def get_input(cast_func=None):
    if cast_func is None:
        return input()
    else:
        return cast_func(input())


def is_prime(n):
    if n == 1:
        return False
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


def main():
    # N, M = get_inputs(int)
    # if N == M:
    #     print('Yes')
    # else:
    #     print("No")
    a, b = get_inputs(int)
    A = str(a)*b
    B = str(b) * a
    if A < B:
        print(A)
    else:
        print(B)

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = sorted([str(a) *b, str(b)* a])
print(ans[0])

Submission status: Accepted

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

print(min(str(a)*b, str(b)*a))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
S = [str(a)*b, str(b)*a]
S.sort()
print(S[0])

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
MIN=min(A,B)
MAX=max(A,B)
print(str(MIN)*MAX)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
A = str(a)*b
B = str(b)*a
print(min(A,B))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = str(a) * b
d = str(b) * a
print(sorted([c, d])[0])

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a > b:
    tmp1 = a * str(b)
else:
    tmp1 = b * str(a)
print(tmp1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
aa=str(a)*b
bb=str(b)*a
print(min(aa,bb))

Submission status: Accepted

Solution code:
def main():
    a, b = input().split()
    na, nb = int(a), int(b)

    s = a * nb
    t = b * na

    ret = min(s, t)

    print(ret)


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())

Submission status: Accepted

Solution code:
a, b = [int(v) for v in input().split()]
if a < b:
    print(str(a) * b)
else:
    print(str(b) * a)

Submission status: Accepted

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

if a<b:
    print(str(a)*b)
else:
    print(str(b)*a)

Submission status: Accepted

Solution code:
A, B = input().split()
print(min(A*int(B),B*int(A)))

Submission status: Accepted

Solution code:
def main():
    a, b = input().split()
    c = [a*int(b), b*int(a)]
    c.sort()
    print(c[0])


main()

Submission status: Accepted

Solution code:
#n = int(input())
a,b = map(int,input().split())
#lst1 = list(map(int,input().split()))

s = str(a)*b
t = str(b)*a

lst = [s,t]

lst.sort()

print(lst[0])

Submission status: Accepted

Solution code:
a,b  = input().split()
str1 = a * int(b)
str2 = b * int(a)
print(min(str1,str2))

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]
s1, s2 = str(A) * B, str(B) * A
print(min(s1, s2))

Submission status: Accepted

Solution code:
import math
a,b= list(map(int,input().split(" ")))
aa = str(a) * b
bb = str(b) * a
if aa < bb:
    print(aa)
else:
    print(bb)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

a, b = input().split()
a2 = a * int(b)
b2 = b * int(a)
print(min(a2, b2))

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, raw_input().split())
    aa = str(a) * b
    bb = str(b) * a
    if aa < bb:
        print aa
    else:
        print bb


main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
tmp = []
tmp.append(str(a)*b)
tmp.append(str(b)*a)
tmp = sorted(tmp)
print(tmp[0])

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A,B = map(int,read().split())

if A > B:
    A,B = B,A

print(str(A) * B)

Submission status: Accepted

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

a = "{}".format(A) * B
b = "{}".format(B) * A

print(a if a < b else b)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
aa = str(a)*b
bb = str(b)*a
if aa<bb:
    print(aa)
else:
    print(bb)

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    if a < b:
        print(str(a) * b)
    else:
        print(str(b) * a)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque, defaultdict
import itertools as ite
import sys
import math
from decimal import *

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

a, b = map(int, raw_input().split())
print min(str(a) * b, str(b) * a)

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())
if a <= b:
    ans = str(a) * b
else:
    ans = str(b) * a
print(ans)

Submission status: Accepted

Solution code:
a, b = input().split()
if a > b:
  a, b = b, a
print(a*int(b))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
A = str(a)*b
B = str(b)*a

l = [A,B]
l.sort()
print(l[0])

Submission status: Accepted

Solution code:
a,b=[int(j) for j in input().split()]
print(min((str(a)*b),(str(b)*a)))

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
print min(str(a)*b, str(b)*a)

Submission status: Accepted

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

s1 = str(a)*b
s2 = str(b)*a

if s1 < s2:
    print(s1)
else:
    print(s2)

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
print(str(min(n,m))*max(n,m))

Submission status: Accepted

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

x = str(a)*b
y = str(b)*a

print(min(x,y))

Submission status: Accepted

Solution code:
a,b = input().split()
li = [a*int(b),b*int(a)]
li.sort()
print(li[0])

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
if a < b:
  A = [a] * b
else:
  A = [b] * a
print("".join(list(map(str, A))))

Submission status: Accepted

Solution code:
a, b = input().split()
ans = min(a * int(b), b * int(a))
print(ans)

Submission status: Accepted

Solution code:
# ABC152b


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10 ** 6)

    a = list(input().split())
    b = [a[0] * int(a[1]), a[1] * int(a[0])]
    b.sort()
    print(b[0])


if __name__ == '__main__':
    main()

Submission status: Accepted

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

c = a*int(b)
d = b*int(a)

print(min(c,d))

Submission status: Accepted

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

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

ans = str(mn) * mx
print(ans)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
aa = str(a) * b
bb = str(b) * a
d = [aa, bb]
d.sort()
print(d[0])

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
A=[str(a)*b,str(b)*a]
print(sorted(A)[0])

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n,m = inpl()
a = ['','']
a[0] = str(n) * m
a[1] = str(m) * n
print(sorted(a)[0])

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a>=b:
    a,b = b,a
ans = str(a)*b
print(ans)

Submission status: Accepted

Solution code:
a, b=map(int, input().split())
s=str(a)*b
t=str(b)*a
print(s if s<t else t)

Submission status: Accepted

Solution code:

a,b = map(str,input().split())
s1 = a*int(b)
s2 = b*int(a)
if s1<=s2:
    print(s1)
else:
    print(s2)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a > b:
  print(str(b) * a)
else:
  print(str(a) * b)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(min(str(a)*b,str(b)*a))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(str(a) * b if str(a) * b < str(b) * a else str(b) * a)

Submission status: Accepted

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

s1 = str(a) * b
s2 = str(b) * a
print( min(s1,s2) )

Submission status: Accepted

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

s1 = str(a)*b
s2 = str(b)*a

print(s1 if s1<s2 else s2)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    a, b = [int(x) for x in input().split()]
    if a > b:
        print(str(b) * a)
    else:
        print(str(a) * b)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = input().split()
l = [a*int(b), b*int(a)]
l.sort()
print(l[0])