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:
#!/usr/bin/env python3

import sys
# import math
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product                # product(iter, repeat=n)
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4


def main():
    mod = 1000000007                  # 10^9+7
    inf = float('inf')
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    a, b = input().split()
    print(a * int(b)) if a <= b else print(b * int(a))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(str, input().split())
judge = True
tmpa = a
tmpb = b
if a > b:judge = True
else: judge = False
if judge:
    for i in range(int(a) - 1):
        b += tmpb
    print(b)
else:
    for i in range(int(b) - 1):
        a += tmpa
    print(a)

Submission status: Accepted

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

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())
if a > b:
    print(str(b)*a)
else:
    print(str(a)*b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a , b = map(int,input().split())
s = max(a,b)
t = min(a,b)
k = 0
for i in range(0,s):
  k += t*(10**i)
  
  
print(k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n, m = list(map(int, input().split()))
    s_1 = str(n) * m
    s_2 = str(m) * n
    if s_1 <= s_2:
        print(s_1)
    else:
        print(s_2)


if __name__ == '__main__':
    main()

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())
A = str(a)*b
B = str(b)*a

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

if a>=b:
    print(B)
else:
    print(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=map(int,input().split())
c=str(a)*b
d=str(b)*a
n=[c,d]
n.sort()
print(n[0])

Submission status: Accepted

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

aS = str(a)*b
bS = str(b)*a

print(min(aS, bS))

Submission status: Accepted

Solution code:
import sys
a, b = map(int, sys.stdin.readline().split())
if a <= b:
  print(int(str(a)*b))
else:
  print(int(str(b)*a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
A = []
B = []
for i in range(b):
    A.append(a)
for i in range(a):
    B.append(b)
c = []
c.append(A)
c.append(B)
c.sort()
for i in range(len(c[0])):
    c[0][i] = str(c[0][i])
print(''.join(c[0]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
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=input().split()
s=''
for i in range(int(b)):
    s+=a
t=''
for i in range(int(a)):
    t+=b
data=[s,t]
data.sort()
print(data[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:
lis = list(map(int,input().split()))
a = [str(lis[0])*lis[1] , str(lis[1])*lis[0]]
a.sort()
print(a[0])

Submission status: Accepted

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

print(str(y)*x)

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:
def cul(x, y):
  z = []
  for i in range(x):
    z.append(int(y) * 10 ** i)

  return sum(z)

def main():
  a,b = map(int, input().split())
  num_a = cul(b, a)
  num_b = cul(a, b)
  test = []
  test.append(num_a)
  test.append(num_b)

  print(sorted(test, reverse = True)[0])


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
A = ""
for i in range(b):
    A += str(a)
B = ""
for i in range(a):
    B += str(b)
print(max(int(A),int(B)))

Submission status: Accepted

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

Submission status: Accepted

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

a, b = input().split()
A = a * int(b)
B = b * int(a)

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

Submission status: Accepted

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

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())
if a <= b:
    print(str(a)*b)
else:
    print(str(b)*a)

Submission status: Accepted

Solution code:
x = input().split()
a = int(x[0])
b = int(x[1])

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

tmp = min(a,b)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    a,b=map(int, input().split())
    a_str=str(a)
    b_str=str(b)
    c=a_str*b
    d=b_str*a
    if a<=b:
        print(c)
    else:
        print(d)
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    a,b=map(int, input().split())
    a_str=str(a)
    b_str=str(b)
    c=a_str*b
    d=b_str*a
    l=[c,d]
    l.sort()
    print(l[0])
resolve()

Submission status: Accepted

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

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=list(map(int,input().split()))
A.sort()
if A[0]==A[1]:
    print(A[0]*str(A[1]))
else:
    print(A[1]*str(A[0]))

Submission status: Accepted

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

Submission status: Accepted

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

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())
c = 0
if a<=b:
  for i in range(b):
    c += a*(10**i)
  print(c)
else:
  for i in range(a):
    c += b*(10**i)
  print(c)

Submission status: Accepted

Solution code:
# ABC 152: B – Comparing Strings
a, b = [s for s in input().split()]

axb = a * int(b)
bxa = b * int(a)

print(min(axb, bxa))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

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

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
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(min(str(a)*b, str(b) * a))

Submission status: Accepted

Solution code:
a,b=list(map(int,input().split()))
mx=max(a,b)
mn=min(a,b)
mns=(str(mn))
s=mns*mx
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(aa if aa < b else bb)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

a, b = rl()

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

Submission status: Accepted

Solution code:
#--Comparing Strings
a, b = map(int, input().split(" "))

def connection(one, two):
  character = " "
  one_str = str(one)
  for i in range(two):
    character = one_str + character 
  return character

aa = connection(a, b)
bb = connection(b, a)

ans = sorted([aa, bb])

print(ans[0])

Submission status: Accepted

Solution code:
#--Comparing Strings

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

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

aa = " "
bb = " "

for i in range(b):
  aa = a_str + aa

for j in range(a):
  bb = b_str + bb

dummy = [aa, bb]
ans = sorted(dummy)

print(ans[0])

Submission status: Accepted

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

c=[a,b]
c=sorted(c)
print(c[0])

Submission status: Accepted

Solution code:
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    A, B = input(str, str)
    print(sorted([A * int(B), B * int(A)])[0])


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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();
num_a = int(a);
num_b = int(b);

if num_b >= num_a:
  print(a*num_b);
else:
  print(b*num_a);

Submission status: Accepted

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

Submission status: Accepted

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

a = str(min(n))
b = max(n)

print(a*b)

Submission status: Accepted

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

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:
#!/usr/bin/env python3

def main():
    a, b = map(int, open(0).read().split())
    R = []
    if (a < b):
        for i in range(b):
            R.append(str(a))
    else:
        for i in range(a):
            R.append(str(b))
    print(''.join(R))


main()

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

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

Submission status: Accepted

Solution code:
a,b = input().split(" ")
s1 = a * int(b)
s2 = b * int(a)

print(min(s1,s2))

Submission status: Accepted

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

sa=''
for i in range(int(b)):
  sa=sa+a
#print(sa)

sb=''
for i in range(int(a)):
  sb=sb+b
#print(sb)

print(sa if sa<sb else sb)

Submission status: Accepted

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

for i in range(max(a,b)):
  ans+=str(min(a,b))

print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = (int(x) for x in input().split())
p = [str(a)]*b
P = "".join(p)
q = [str(b)]*a
Q = "".join(q)
words = [P, Q]
word = sorted(words)[0]
print(word)

Submission status: Accepted

Solution code:
def main():
    a, b = input().split()
    ia = a*int(b)
    ib = b*int(a)
    if ia > ib:
        print(int(ib))
    elif ia < ib:
        print(int(ia))
    else:
        print(int(ia))
main()

Submission status: Accepted

Solution code:
def small(x,y):
  if x>y:
    return str(y)*x
  else:
    return str(x)*y
  
a,b=map(int,input().split())
result=small(a,b)
print(result)

Submission status: Accepted

Solution code:
from itertools import repeat
a,b = map(int, input().split())
if b < a:
  a, b = b, a
print(''.join(repeat(str(a), b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=input().split()
s1=""
for i in range(int(b)):
    s1=s1+a
s2=""
for j in range(int(a)):
    s2=s2+b
l=sorted([s1,s2])
print(l[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

c.append(str(a)*b)
c.append(str(b)*a)

c.sort()

print(c[0])

Submission status: Accepted

Solution code:
a, b = (int(x) for x in input().split())
a1 = str(a)*b
b1 = str(b)*a
lis = [a1, b1]
new_lis = sorted(lis)
print(new_lis[0])

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

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:
a,b = (int(x) for x in 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:
a, b = map(int, raw_input() .split())
y = a*str(b)
z = b*str(a)
if int(y) > int(z):
    print y
else:
    print z

Submission status: Accepted

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

Submission status: Accepted

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

if a>=b:
    ans=[b]*a
else:
    ans=[a]*b
ans=map(str,ans)
print("".join(ans))

Submission status: Accepted

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

a2 = str(a)*b
b2 = str(b)*a

if a<b:
  print(a2)
else:
  print(b2)

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
def q2():
    a, b = (int(i) for i in input().split())
    if a >= b:
        print(str(b)*a)
    else:
        print(str(a)*b)


if __name__ == '__main__':
    q2()

Submission status: Accepted

Solution code:
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''


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

Submission status: Accepted

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

Submission status: Accepted

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

#https://atcoder.jp/contests/abc152/tasks/abc152_b
a, b= [int(i) for i in input().split()]

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

Submission status: Accepted

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

if a < b:
    print(S1)
else:
    print(S2)

Submission status: Accepted

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

s1 = "".join([str(a)] * b)
s2 = "".join([str(b)] * a)

print(min(s1, s2))

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())
for i in range(max(a, b)):
    print(min(a, b), end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = map(int, input().split())
'''
s = str(b)*a
t = str(a)*b
if s >= t:
    print(t)
else:
    print(s)
'''
for i in range(max(a,b)):
    print(min(a,b),end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
s=''
t=''
for i in range(a):
  s+=str(b)
for j in range(b):
  t+=str(a)
print(min(s,t))

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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

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

#print(aa*b)
#print(bb*a)
if aa*b <= bb*a:
    print(aa*b)
else:
    print(bb*a)

Submission status: Accepted

Solution code:
x = input()
a = int(x.split()[0])
b = int(x.split()[1])
sum_a = ''
sum_b = ''

for i in range(b):
    str_a = str(a)
    sum_a = sum_a + str_a
sum_a = int(sum_a)

for i in range(a):
    str_b = str(b)
    sum_b = sum_b + str_b
sum_b = int(sum_b)

if sum_a >= sum_b:
    print(sum_a)
else:
    print(sum_b)

Submission status: Accepted

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

Submission status: Accepted

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

A = a * int(b)
B = b * int(a)
print(min(A, B))

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = list(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=input().split()
c=min(int(a),int(b))
d=max(int(a),int(b))
print(str(c)*d)

Submission status: Accepted

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

Submission status: Accepted

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


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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 = 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())
ans = sorted([str(a)*b,str(b)*a])

print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = [int(v) for v in input().split()]

if str(A) > str(B):
    print(str(B) * A)
else:
    print(str(A) * B)

Submission status: Accepted

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

Submission status: Accepted

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

def main():
     a, b = map(int, input().split())
     if a <= b:
          word = ''.join([str(a) for i in range(b)])
     else:
          word = ''.join([str(b) for i in range(a)])

     print(word)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

ans=' '
if a >= b:
    for i in range(int(a)):
        ans += b
else:
    for i in range(int(b)):
        ans += a
print(ans)

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b = list(map(int, readline().split()))
    print(str(a) * b if str(a) * b <= str(b) * a else str(b) * a)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

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())
dum1 = min(a,b)
dum2 = max(a,b)
ans = ""
for i in range(dum2):
  ans += str(dum1)
print(ans)

Submission status: Accepted

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

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)

Submission status: Accepted

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

for i in range(b):
	A += a*10**i

for i in range(a):
	B += b*10**i

if a==b: 
	print(A)

elif a>b:
	print(B)
else:
	print(A)

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 = (int(x) for x in input().split())
result = ""
if a > b:
    for _ in range(a):
        result += str(b)
else:
    for _ in range(b):
        result += str(a)
print(result)

Submission status: Accepted

Solution code:
import sys
x = list(map(int,input().split()))

a = x[0]
b = x[1]

if a > b:
    large = a
    small = b
elif a < b:
    large = b
    small = a
else:
    ans = ''.join([str(a)]*a)
    print(ans)
    sys.exit()

ans = ''.join([str(small)]*large)
print(ans)

Submission status: Accepted

Solution code:
n, m = map(int,input().strip().split())
temp = int('{}'.format(n)*m)
m = int('{}'.format(m)*n)
temp = str(temp)
m = str(m)
if temp==m:
    print(temp)
elif temp[0]<m[0]:
    print(temp)
else:
    print(m)

Submission status: Accepted

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

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()
aa=a*int(b)
bb=b*int(a)
if aa<bb:print(aa)
else:print(bb)

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    a,b = map(int, 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()
aint = int(a)
bint = int(b)

x = a * bint
y = b * aint
print(x if x <= y else y)