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:
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations,groupby
import sys
import bisect
import string
import math
import time
import random
def S_():
    return input()
def LS():
    return [i for i in input().split()]
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def NI(n):
    return [int(input()) for i in range(n)]
def NI_(n):
    return [int(input())-1 for i in range(n)]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def LtoS(ls):
    return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)]
        rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()
sys.setrecursionlimit(10**5)
input=lambda: sys.stdin.readline().rstrip()

def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True

ans=0


ans=0

n,m=LI()
a=str(n)*m
b=str(m)*n
if a>b:
    a=b
print(a)

Submission status: Accepted

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

k = str(a)*b
l = str(b)*a

if k < l:
    print(k)
elif k > l:
    print(l)
else:
    print(k)

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

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

else:
  print(str(b)*a)

Submission status: Accepted

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

A = ''.join([str(a)] * b)
B = ''.join([str(b)] * a)

if A <= B:
    print(A)
else:
    print(B)

Submission status: Accepted

Solution code:
#coding:utf-8
a,b = map(int,input().split())
if (a>b):
    a,b = b,a
print (str(a)*b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if (a>b):a,b=b,a
res=''
for i in range(b):
    res+=str(a)
print(res)

Submission status: Accepted

Solution code:
#b comparing strings
a,b=input().split()
n=int(max(a,b))
m=min(a,b)
ans=""
for i in range(n):
    ans+=m
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

result = ""
if a <= b:
    for i in range(b):
        result += str(a)
else:
    for i in range(a):
        result += str(b)
        
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

    al = [a]*b
    bl = [b]*a

    if al > bl:
        print(''.join(map(str,bl)))
    else:
        print(''.join(map(str,al)))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
b=a.split()
if int(b[0])<int(b[1]):
    c=b[0]*int(b[1])
    print(c)
elif int(b[0])>int(b[1]):
    c=b[1]*int(b[0])
    print(c)
else:
    c=b[1]*int(b[0])
    print(c)

Submission status: Accepted

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

s_a = str(a)*b
s_b = str(b)*a

if s_a <= s_b:
    print(s_a)
else:
    print(s_b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

base=""

if a<b:
    for i in range(b):
        base=base+str(a)
        
elif a>=b:
    for i in range(a):
        base=base+str(b)

print(base)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
a_str=''
b_str=''
for i in range(b):
  a_str += str(a)
for i in range(a):
  b_str += str(b)
 
if a > b:
  print(b_str)
else:
  print(a_str)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
s=str()
t=str()
for i in range(b):
    s=s+str(a)
for i in range(a):
    t=t+str(b)
print(sorted([s,t])[0])

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:
N, M = map(int,input().split())
ans = ""
if N>M:
    for i in range(N):
        ans += str(M)
else:
    for i in range(M):
        ans += str(N)
print(ans)

Submission status: Accepted

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
if(a >= b):
  tmp = a
  a = b
  b = tmp
answer = ""
for i in range(b):
  answer += str(a)
print(answer)

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 = [int(i) for i in input().split()]
A = max(a,b)
B = min(a,b)
a_list=[]
for _ in range(A):
	a_list.append(B)
print(''.join(map(str,a_list)))

Submission status: Accepted

Solution code:
# B - Comparing Strings
def main():
    A, B = sorted(map(int, input().split()))
    ans = str(A) * B
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()
a = int(a)
b = int(b)
min = 0
if a > b:
  min = b
  count = a
else:
  min = a
  count = b

output = str(min)
for i in range(count - 1):
  output += str(min)

print(output)

Submission status: Accepted

Solution code:
liststr=input().split()
ans=0
if liststr[0] > liststr[1]:
  liststr[0],liststr[1]=liststr[1],liststr[0]

data=int(liststr[0])
data1=int(liststr[1])
for i in range(data1):
    ans=10*ans+data
print(ans)

Submission status: Accepted

Solution code:
N,M = map(int,input().split())
A = str(N) * M
B = str(M) * N
C = []
C.append(A)
C.append(B)
C = sorted(C)
print(C[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
if n == m:
  print(''.join([str(m)]*n))
else:
  N = ''.join([str(n)]*m)
  M = ''.join([str(m)]*n)
  print(min(N, M))

Submission status: Accepted

Solution code:
aa = input()
l = aa.split()
a = l[0]
b = l[1]


x =""
y= ""
for i in range(1,int(b)+1):
    x = x+a
for i in range(1,int(a)+1):
    y = y+b
if x>y:
    print(y)
else:
    print(x)

Submission status: Accepted

Solution code:
a,b=input().split()
aa=[a for i in range(int(b))]
bb=[b for i in range(int(a))]
print(min(("".join(aa)),("".join(bb))))

Submission status: Accepted

Solution code:
n,m=[int(i) for i in input().split()]
ans=""
if n>=m:
  for i in range(n):
    ans+=str(m)
else:
  for i in range(m):
    ans+=str(n)
print(ans)

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
ans = 0
if a > b:
    a, b = b, a
for i in range(b):
    ans += a * (10 ** i)
print(ans)

Submission status: Accepted

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

#output
S = "{0}".format(a)*b
T = "{}".format(b)*a

if S > T:
    print(T)
else:
    print(S)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def dctLr(lst1, lst2):
  length = min(len(lst1), len(lst2))
  for i in range(length):
    if lst1[i] < lst2[i]:
      return lst1
    elif lst1[i] > lst2[i]:
      return lst2
  return shorter(lst1, lst2)

def shorter(lst1, lst2):
  diff = len(lst1) - len(lst2)
  if diff < 0:
    return lst1
  else:
    return lst2

inp = input().split(' ')
print(''.join(dctLr(inp[0] * int(inp[1]), inp[1] * int(inp[0]))))

Submission status: Accepted

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

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

Submission status: Accepted

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

if b<a:
  a,b=b,a

print(str(a)*b)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

n,m = input().split()

nn = str(n * int(m))
mm = str(m * int(n))

aa = [nn,mm]
aa.sort()
print(aa[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = raw_input().split()
a_ans = ""
b_ans = ""
for i in range(int(b)):
  a_ans += a
for i in range(int(a)):
  b_ans += b
if int(a) >= int(b):
  print b_ans
else:
  print a_ans

Submission status: Accepted

Solution code:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    a, b = list(map(int, input().rstrip('\n').split()))
    ls = []
    ls.append(str(b) * a)
    ls.append(str(a) * b)
    ls.sort()
    print(ls[0])


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
def solve(string):
    a, b = map(int, string.split())
    return str(a) * b if a < b else str(b) * a


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
a_l = ""
b_l = ""
for i in range(b):
  a_l += str(a)
for j in range(a):
  b_l += str(b)
if a>b:
  print(b_l)
elif b<a:
  print(a_l)
else:
  print(a_l)

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 = input().split()
atxt, btxt = "", ""
for i in range(int(b)):
  atxt += a
for i in range(int(a)):
  btxt += b
if atxt <= btxt:
  print(atxt)
else:
  print(btxt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=input().split()
c,d=int(a),int(b)
p=a*d
q=b*c
k=0
e=max(c,d)
if p==q:
    print(p)
elif p[0]>q[0]:
    print(q)
elif p[0]<q[0]:
    print(p)

Submission status: Accepted

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

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

if f <= s:
  print(f)
else:
  print(s)

Submission status: Accepted

Solution code:
m,n = map(int,input().split())
res=""
if m < n :
    for i in range(n):
        res = res + str(m)     
elif m >= n :
    for i in range(m):
        res = res + str(n)
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc152b

a,b=map(str,raw_input().split())
ab=a*int(b)
ba=b*int(a)
if ab>=ba:
 print ba
else:
 print ab

Submission status: Accepted

Solution code:
x,y = (int(i) for i in input().split())
if x<=y:
  x=str(x)
  print(x*y)
elif y<x:
  y=str(y)
  print(y*x)

Submission status: Accepted

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

A = a
B = b

for i in range(int(b) - 1):
  A += a

for i in range(int(a) - 1):
  B += b

if A > B:
  print(int(B))
else:
  print(int(A))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L = sorted(list(map(str,input().split())))

print(L[0]*int(L[1]))

Submission status: Accepted

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

a_str = str(a)*b
b_str = str(b)*a

if a_str <= b_str:
    print(a_str)
else:
    print(b_str)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(str,input().split())
res = ''
if a > b :
    for _ in range(int(a)):
        res += b
else:
    for _ in range(int(b)):
        res += a
print(res)

Submission status: Accepted

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

a_b = a * int(b)
b_a = b * int(a)
print(min(a_b, b_a))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
out = 0
if a > b:
    while a > 0:
        out *= 10
        out += b
        a -= 1
else:
    while b > 0:
        out *= 10
        out += a
        b -= 1

print(out)

Submission status: Accepted

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

aa = a * int(b)
bb = b * int(a)

print(min(aa, bb))

Submission status: Accepted

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

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

Submission status: Accepted

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

x = a * int(b)
y = b * int(a)
print(min(x, y))

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

if a == b:
    print(str(a) * a)
else:
    print(str(min(a, b))*max(a, b))

Submission status: Accepted

Solution code:
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 = map(int,input().split());print(str(a)*b if a<b else str(b)*a)

Submission status: Accepted

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

if b>c:
    while b>0:
        out *=10
        out +=c
        b -=1
else:
    while c>0:
        out *=10
        out +=b
        c -=1
print(out)

Submission status: Accepted

Solution code:
def wczytaj_liste(): 
    wczytana_lista = input()
    lista_znakow = wczytana_lista.split()
    ostateczna_lista = []
    for element in lista_znakow:
        ostateczna_lista.append(int(element))
    return ostateczna_lista 

def porownaj(): 
    a, b = wczytaj_liste() 
    if a < b:
        for i in range(b):
            print(a , end ='')
    else: 
        for i in range(a):
            print(b , end ='')

porownaj()

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:
a, b = [x for x in input().split()]
print(sorted([a * int(b), b * int(a)])[0])

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
sum=0
if a==b:
  for i in range(a):
   	sum+=a*pow(10,i)
  print(sum)
elif a<b:
  for i in range(b):
   	sum+=a*pow(10,i)
  print(sum)
elif b<a:
  for i in range(a):
   	sum+=b*pow(10,i)
  print(sum)

Submission status: Accepted

Solution code:
a,b = input().split()
atxt = ''.join([a for _ in range(int(b))])
btxt = ''.join([b for _ in range(int(a))])
if atxt <= btxt :
    print(atxt)
else :
    print(btxt)

Submission status: Accepted

Solution code:
N,M=map(int,input().split())

a=[]

if N>M:
    for i in range(N):
        a.append(M)
    print("".join(map(str,a)))

else:
    for i in range(M):
        a.append(N)
    print("".join(map(str,a)))

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=input().split()
print(min(b*int(a),a*int(b)))

Submission status: Accepted

Solution code:
import numpy as np
a,b = map(int,input().split())
if (a*10**b) > (b*10**a):
    print(int(a * (10**(b-1) + 10**(b-2) + 10**(b-3) + 10**(b-4) + 10**(b-5) + 10**(b-6) + 10**(b-7) + 10**(b-8) + 10**(b-9))))
else:
    print(int(b * (10**(a-1) + 10**(a-2) + 10**(a-3) + 10**(a-4) + 10**(a-5) + 10**(a-6) + 10**(a-7) + 10**(a-8) + 10**(a-9))))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
x=[]
y=[]
for i in range(b):
    x.append(str(a))
for i in range(a):
    y.append(str(b))
x=''.join(x)
y=''.join(y)
z=[x,y]
z=sorted(z)
print(z[0])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(a: int, b: int):
    if a >= b:
        print(str(b)*a)
    else:
        print(str(a)*b)
    return



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=map(str,input().split())

aa=a*int(b)
bb=b*int(a)

print(min(aa,bb))

Submission status: Accepted

Solution code:
a, b = raw_input().split()
a_collection = a * int(b)
b_collection = b * int(a)
print sorted([a_collection, b_collection])[0]

Submission status: Accepted

Solution code:
import math as mt
a,b=map(int,input().split())
s,q=[],[]
for i in range(b):
    s.append(a)
for i in range(a):
    q.append((b))
if s<=q:
    print(*s,sep="")
else:
    print(*q,sep="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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 = map(int, input().split())

stra = ''.join(map(str, [a for i in range(b)]))
strb = ''.join(map(str, [b for i in range(a)]))
ans = [stra ,strb]
ans.sort(reverse = False)
#print(ans)
print(ans[0])

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a, b = input().split()
atxt = ''.join([a for _ in range(int(b))])
btxt = ''.join([b for _ in range(int(a))])

if atxt <= btxt:
    print(atxt)
else:
    print(btxt)

Submission status: Accepted

Solution code:
_,a,b=sorted(input());print(a*int(b))

Submission status: Accepted

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

list = [A, B]
list.sort()

print(list[1])

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
import math
import itertools
a,b=map(int,input().split())
if str(a)*b<str(b)*a:
    print(str(a)*b)
else:
    print(str(b)*a)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
aList = [b]*a
bList = [a]*b
i = 0
l = min(len(bList),len(aList))
if a==b:
    pass
else:
    while aList[i]==bList[i]:
        i+=1
        if i+1==l:
            break
if aList[i]>bList[i]:
    print(*bList,sep="")
else:
    print(*aList,sep="")

Submission status: Accepted

Solution code:
r = input()
k=r.split()



t1=t2=''

t1=k[0]*int(k[1])
t2=k[1]*int(k[0])



rr = [t1,t2]

rr.sort()

print(rr[0])

Submission status: Accepted

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

var1 = 0
var2 = 0

for i in range(a[1]):
    var1 = var1 * 10 + a[0]

for i in range(a[0]):
    var2 = var2 * 10 + a[1]

if a[0] <= a[1]:
    print(var1)
else:
    print(var2)

Submission status: Accepted

Solution code:
N,M = map(int,input().split())
if (N<M):
    print(str(N)*M)
elif (M<N):
    print(str(M)*N)
else:
    print(str(M)*N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = str(a)
d = str(b)
for i in range(b - 1):
    c = c + str(a)
for j in range(a - 1):
    d = d + str(b)

if(c >= d):
    print(d)
else:
    print(c)

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 = input().split()

if a >= b:
  print(b*int(a))
else:
  print(a*int(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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:
input = input().split(" ")
if int(input[0]) == int(input[1]):
  string = ""
  for i in range(int(input[1])):
    string += input[0]
  print(string)
else:
  stro = ""
  strt = ""
  for i in range(int(input[1])):
    stro += input[0]
  for i in range(int(input[0])):
    strt += input[1]
  if int(stro) > int(strt):
    print(stro)
  elif int(strt) > int(stro):
    print(strt)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
x=str(a)
y=str(b)
for i in range(b-1):
    x=x+str(a)

for i in range(a-1):
    y=y+str(b)

list=[x,y]
list.sort()
print(list[0])

Submission status: Accepted

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

a,b=acinput()

a_str=str(a)
b_str=str(b)

res1=a_str*b
res2=b_str*a

print(sorted([res1,res2])[0])

Submission status: Accepted

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

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

ans = ""
for i in range(m):
  ans += str( n )
print( ans )

Submission status: Accepted

Solution code:
n,m=[int(i) for i in input().split()]
li=[]
if n>=m:
    for i in range(n):
        li.append(m)
    for i in range(n):
        print(li[i],end="")
    print()

else:
    for i in range(m):
        li.append(n)
    for i in range(m):
        print(li[i],end="")
    print()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = input().split()
a = int(A)
b = int(B)
out = ''
if a > b:
    for i in range(a):
        out += B
else:
    for i in range(b):
        out += A
print(out)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = list(map(int, input().split()))
M=max(a,b)
N=min(a,b)
A=0
for i in range(0,M):
  A=10*A
  A=A+N
print(A)

Submission status: Accepted

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

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

data = sorted([ab, ba])

print(data[0])

Submission status: Accepted

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

if a > b:
    for i in range(0, a + 1):
        anser = str(b) * i
if a == b:
    for i in range(0, a + 1):
        anser = str(b) * i
if a < b:
    for i in range(0, b + 1):
        anser = str(a) * i
print(anser)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()
sumA = ""
sumB = ""
for i in range(int(b)):
    sumA +=""+str(a)
for i in range(int(a)):
    sumB +=""+str(b)
if(int(sumA)>int(sumB)):
    print(sumA)
elif(int(sumB)>int(sumA)):
    print(sumB)
elif(int(sumA) == int(sumB)):
    print(sumA)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    x, y = map(int, input().split(' '))
    if y >= x:
        print(str(x) * y)
    else:
        print(str(y) * x)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

aa = [str(b) for _ in range(0, a)]
bb = [str(a) for _ in range(0, b)]

aa, bb = "".join(aa), "".join(bb)
if aa > bb:
    print(bb)
else:
    print(aa)

Submission status: Accepted

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
string = ""
if a>b:
    for i in range(a):
        string = string+str(b)
elif b>a:
    for i in range(b):
        string = string+str(a)
else:
    for i in range(a):
        string =  string+str(a)
print(string)

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
ans=0

if i[0]<i[1]:
    for n in range(i[1]):
        ans += i[0]*10**n

else:
    for n in range(i[0]):
        ans += i[1]*10**n

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input().split()
b=int(a[0])
c=int(a[1])
d=[c]*(b-1)
e=str(c)
for i in d:
  e=e+str(c)
f=[b]*(c-1)
g=str(b)
for i in f:
  g=g+str(b)
if e<g :
  print(e)
else:
  print(g)

Submission status: Accepted

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

Submission status: Accepted

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

a1 = "{}".format(b)*a
b1 = "{}".format(a)*b

print("{}".format(b1) if min(a,b)==a else "{}".format(a1))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a>b:
  for x in range (0,a):
    print(b,end='')
elif a==b:
  for x in range (0,a):
    print(a,end='')
else:
  for x in range (0,b):
    print(a,end='')

Submission status: Accepted

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

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:
O,K = input().split()
I = O*int(K)
U = K*int(O)
print(sorted([I,U])[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B=input().split()
a=int(A)
b=int(B)
ans=0
if a<b:
  while b>0:
    b-=1
    ans+=a*(10**b)
elif a==b:
  while b>0:
    b-=1
    ans+=a*(10**b)
else:
  while a>0:
    a-=1
    ans+=b*(10**a)
  
print(ans)

Submission status: Accepted

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