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

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

if(a<b):
  print (x1)
  
elif(b<a):
  print (x2)
  
else:
  print (x1)

Submission status: Accepted

Solution code:
def make_num(a, b):
    num = ""
    for i in range(b):
        num += str(a)
    return num

def slove(a, b):

    num1 = make_num(a, b)
    num2 = make_num(b, a)
    
    return min(num1, num2)

if __name__ == "__main__":

    a, b = [int(i) for i in input().split()]
    ans = slove(a, b)
    print(ans)

Submission status: Accepted

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

c = max(a, b)
d = str(min(a, b))

print(d*c)

Submission status: Accepted

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

print((min(A,B)))

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
a_arr, b_arr = [], []
a_str, b_str, = "", ""
for _ in range(int(a)):
  b_arr.append(b)
b_str = "".join(b_arr)
for _ in range(int(b)):
  a_arr.append(a)
a_str = "".join(a_arr)
if a_str > b_str:
  print(b_str)
elif b_str < a_str:
  print(a_str)
else:
  print(a_str)

Submission status: Accepted

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

a_s = ""
for i in range(b):
    a_s = a_s + str(a)

b_s = ""
for i in range(a):
    b_s = b_s + str(b)

tmp = [a_s,b_s]
ans = sorted(tmp)[0]

print(ans)

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())
c = sorted([str(a)*b, str(b)*a])
print(c[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(m if len(m) > len(n) else n )

Submission status: Accepted

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

Submission status: Accepted

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

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

for j in range(int(a)-1):
    ansb += b

if int(a) <= int(b):
    print(ansa)

else:
    print(ansb)

Submission status: Accepted

Solution code:
x,y = input().split()
x = int(x)
y = int(y)
if x>y:
  for i in range(x):
    print(y,end="")
else:
  for i in range(y):
    print(x,end="")

Submission status: Accepted

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

Submission status: Accepted

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

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

print(aa if a < b else bb)

Submission status: Accepted

Solution code:
s = input().split()
result = ""

if s[1] >= s[0]:
    for i in range(int(s[1])):
        result += str(s[0])
    print(result)
else:
    for i in range(int(s[0])):
        result += str(s[1])
    print(result)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
if a[0] <= a[1]:
    for i in range(a[1]):
        print(a[0],end="")
else:
    for i in range(a[0]):
        print(a[1],end="")

Submission status: Accepted

Solution code:
Input = input().split()
Input[0] = int(Input[0])
Input[1] = int(Input[1])
 
if Input[0] >= Input[1]:
  print(str(Input[1])*Input[0])
  
else:
  print(str(Input[0])*Input[1])

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

i=1
j=1

c=a
d=b

while(i<b):
  c+=a*(10**i)
  i+=1

while(j<a):
  d+=b*(10**j)
  j+=1

list=[str(c),str(d)]
list.sort()

if(a==b):
  print(str(c))
else:
  print(list[0])

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:
a,b=map(int,input().split())
c=[a]*b
d=[b]*a
for i in range(1):
  if c[i]>d[i]:
    e=str(b)*a
    print(e)
  elif c[i]==d[i]:
    if len(c)>len(d):
      z=str(a)*b
        
      print(z)
    else:
      s=str(b)*a
      print(s)
  else:
    g=str(a)*b
    print(g)

Submission status: Accepted

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

def main():
  A,B=map(int, input().split())
  num_max = max(A,B)
  num_min = min(A,B)
  res = ""
  for i in range(num_max):
    res = str(res) + str(num_min)
  print(res)


if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

str1 = a*int(b)
str2 = b*int(a)

print(sorted([str1, str2])[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

print(min(ab,ba))

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = 0
d = 0
for i in range(b):
    c += (10 ** i) * a
for j in range(a):
    d += (10 ** j) * b
k = [str(c),str(d)]
k.sort()
print(k[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hoge = input().split(" ")
a=""
b=""
for i in range(int(hoge[1])):
  a += hoge[0]
for i in range(int(hoge[0])):
  b += hoge[1]
txt = [a,b]
txt.sort()
print(txt[0])

Submission status: Accepted

Solution code:
input_line = list(map(int,input().split()))
c = []
d = []
result_list = []

for i in range(input_line[1]):
    c.append(input_line[0])
    map_result = map(str, c)
    c_result = ''.join(map_result)

for i in range(input_line[0]):
    d.append(input_line[1])
    map_result = map(str, d)
    d_result = ''.join(map_result)

result_list.append(c_result)
result_list.append(d_result)

e = list(map(int, result_list))
print(sorted(e)[1])

Submission status: Accepted

Solution code:
n=input().split()
te = n[0]*int(n[1])
re = n[1]*int(n[0])
list=[te,re]
rest = sorted(list)
print(rest[0])

Submission status: Accepted

Solution code:

a, b = input().split()

int_a = int(a)
int_b = int(b)

a_List = ''
b_List = ''

for i in range(int_a):
    b_List = b_List + b

for i in range(int_b):
    a_List = a_List + a


# print('a_List : ' + a_List)
# print('b_List : ' + b_List)

a_List = int(a_List)
b_List = int(b_List)

if a_List >= b_List:
    print(a_List)

else:
    print(b_List)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
l=[[1,1],[2,11],[3,111],[4,1111],[5,11111],[6,111111],[7,1111111],[8,11111111],[9,111111111]]

c=0
d=0

for i in range(9):
    if l[i][0]==a:
        c=b*l[i][1]
    if l[i][0]==b:
        d=a*l[i][1]
if a>b:
    print(c)
else:
    print(d)

Submission status: Accepted

Solution code:
a,b = input().split()
n = a*int(b)
m = b*int(a)
l = [n,m]
l.sort()
#print(type(n),"--",m)
print(l[0])

Submission status: Accepted

Solution code:
nums = input().split()

A=int(nums[0])
B=int(nums[1])

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

Submission status: Accepted

Solution code:
a,b=input().split(" ")
a=int(a)
b=int(b)
 
a_str=""
b_str=""
for i in range(a):
  b_str=b_str+str(b)
for i in range(b):
  a_str=a_str+str(a)
if int(a_str[0]) > int(b_str[0]):
  print(b_str)
elif int(a_str[0]) < int(b_str[0]):
  print(a_str)
else:
  print(a_str)

Submission status: Accepted

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

i.sort()


for j in range(i[1]):
  print(i[0],end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = a[0] - a[1]
if b == 0 :
	print(str(a[0]) * a[0])
else : print(str(min(a[0], a[1])) * max(a[0], a[1]))

Submission status: Accepted

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

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

Submission status: Accepted

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

a_s = str(a)
for i in range(1, b):
    a_s += str(a)

b_s = str(b)
for i in range(1, a):
    b_s += str(b)

if a_s > b_s:
    print(b_s)
else:
    print(a_s)

Submission status: Accepted

Solution code:
nums = input().split()

if (nums[0].isdigit()==True) and (nums[1].isdigit()==True):
    a=int(nums[0])
    b=int(nums[1]) 
    if (1<=a) and (a<=9) and (1<=b) and (b<=9) :
        if a<=b:
            n_min=a
            n_max=b
        else:
            n_min=b
            n_max=a
        l=str(n_min)*n_max
        print(l)

Submission status: Accepted

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

Submission status: Accepted

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

aa = ''
bb = ''
for i in range(a):
	bb += str(b)

for i in range(b):
	aa += str(a)


if aa > bb:
	print(bb)
else:
	print(aa)

Submission status: Accepted

Solution code:
m,n=map(int,input().split())
a=b=""
if m!=n :
    for i in range(m) :
        a=a+str(n)
    for i in range(n) :
        b=b+str(m)
    if len(a)>len(b) :
        print(a)
    else :
        print(b)
else :
    for i in range(m) :
        a=a+str(n)
    for i in range(n) :
        b=b+str(m)
    print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/user/bin/env python
#pythonプログラムであることを示している

# -*- coding: utf-8 -*-
"""
このプログラムはPythonを書く際のテンプレとなっています。これをコピペしてコーディングを行なってください。
なお字下げしないこと！！
"""

__author_ = 'Maruta Yuzuha'
__version_ = '1.0.0'
__date__ = '2019/12/25'

def main():
    """
    ここでプログラムの解説を行う
     >>main()
    Hello world.
    0
    """
    s = input().split()
    a = 0
    b = 0
    for i in range(int(s[1])):
        if i == 0:
            a = s[0]
        else:
            a += s[0]

    for i in range(int(s[0])):
        if i == 0:
            b = s[1]
        else:
            b += s[1]

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

    return 0

if __name__ == '__main__':
    #上記のifの記述によってこのスクリプトファイルが起動された時だけ実行する部分になる。
    #ちなみにスクリプトが "モジュールとして"インポートされた時には実行されない、

    #単体テスト:モジュールのdocstring(ドキュメンテーション文字列)に記載された全ての対話実行例が書かれている通りに動作するかを確認
    #python ファイル名 -v
    import doctest
    doctest.testmod()

    #実際にmain()を呼び出して、結果を得て、その結果でPythonシステムを終える
    import sys
    sys.exit(main())

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:
b = input()
c =b.split(" ")
a = int(c[0])
d = int(c[1])
if a > d:
    print(c[1] * a)
else:
    print(c[0]*d)

Submission status: Accepted

Solution code:
def resolve():
    a, b = input().split()
    ab_list = []
    
    ab = a*int(b)
    ba = b*int(a)

    ab_list.append(ab)
    ab_list.append(ba)
 
    ab_list = sorted(ab_list)
 
    print(ab_list[0])
 
if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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:
s = input().rstrip().split(' ')
a = int(s[0])
b = int(s[1])
first = str(a) * b
second = str(b) * a
lst = [first, second]
lst.sort()
print(lst[0])

Submission status: Accepted

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

a_l = []
b_l = []
for i in range(b):
    a_l.append(str(a))
for i in range(a):
    b_l.append(str(b))

a_b = ''.join(a_l)
b_a = ''.join(b_l)

lst = sorted([a_b, b_a])
print(lst[0])

Submission status: Accepted

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


x = []
y = []
ans = []
for i in range(a):
    x.append(str(b))
for j in range(b):
    y.append(str(a))

if b < a:
    ans = ''.join(x)
    print(ans)
elif a < b:
    ans = ''.join(y)
    print(ans)
elif b == a:
    ans = ''.join(y)
    print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

x = 0
y = 0
n = 1
m = 1

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

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

print(max(x,y))

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

ab = ''
ba = ''

for i in range(a):
    ab += str(b)

for i in range(b):
    ba += str(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

A = ""
B = ""

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

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

lis = []
lis.append(A)
lis.append(B)

lis.sort()

print(lis[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:
a, b = input().split()

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


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

Submission status: Accepted

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

astr=( str(a) * b )
bstr=( str(b) * a )

print(astr if astr < bstr else bstr)

Submission status: Accepted

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

final_list = [(str(s_list[0]) * s_list[1])]
final_list.append(str(s_list[1]) * s_list[0])
final_list.sort()
print(final_list[0])

Submission status: Accepted

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

Str_a = str(A[0]) * A[1]
Str_b = str(A[1]) * A[0]

if A[0] <= A[1]:
    print(Str_a)
else:
    print(Str_b)

Submission status: Accepted

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

tmp1 = a * int(b)
tmp2 = b * int(a)

ans =sorted([tmp1,tmp2])
print(ans[0])

Submission status: Accepted

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

a_str, b_str = [], []
for i in range(0,b):
  a_str.append(a)
for i in range(0,a):
  b_str.append(b)

if a > b :
  print(''.join(map(str,b_str)))
else :
  print(''.join(map(str,a_str)))

Submission status: Accepted

Solution code:
from itertools import repeat
a, b = input().split()
a = int(a)
b = int(b)
l = []
if a < b or a == b:
    a = str(a)
    l.extend(repeat(a, b))
    print("".join(l))
else:
    b = str(b)
    l.extend(repeat(b, a))
    print("".join(l))

Submission status: Accepted

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

AB = A*int(B)
BA = B*int(A)

ret = sorted([AB, BA])
print(ret[0])

Submission status: Accepted

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

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

print(sorted([ab, ba])[0])

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 j in range(a):
    B += b * (10 ** j)

l = [str(A), str(B)]
l2 = sorted(l)
print(int(l2[0]))

Submission status: Accepted

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

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

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

l = [s, t]
l.sort()
print(l[0])

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
str_a = ""
str_b = ""
for i in range(b):
    str_a += str(a)
for i in range(a):
    str_b += str(b)

if str_a >= str_b:
    print(str_b)
else:
    print(str_a)

Submission status: Accepted

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

stra = str(a) * b
strb = str(b) * a

if stra < strb:
    print(stra)
else:
    print(strb)

Submission status: Accepted

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

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

Submission status: Accepted

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


a_s = ""
b_s = ""

for _ in range(b):
    a_s = a_s + str(a)

for _ in range(a):
    b_s = b_s + str(b)

if a_s <= b_s:
    print(a_s)
else:
    print(b_s)

Submission status: Accepted

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

string1 = a * int(b)
string2 = b * int(a)

if string1 > string2:
  print(string2)
else:
  print(string1)

Submission status: Accepted

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

stra = str(a) * b
strb = str(b) * a
ablist = [stra, strb]
ablist = sorted(ablist)
print(ablist[0])

Submission status: Accepted

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

a_b = (a*int(b))
b_a = (b*int(a))

if a_b < b_a:
    print(a_b)
else:
    print(b_a)

Submission status: Accepted

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

A = ""
B = ""

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

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

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

Submission status: Accepted

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


A = ["".join(str(a) for i in range(b))]
B = ["".join(str(b) for i in range(a))]

C = A+B

C.sort()
print(C[0])

Submission status: Accepted

Solution code:
import sys; readline = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
li = input().split()

if li[0]>=li[1]:
  print(li[1] *int(li[0]))
else:
  print(li[0] *int(li[1]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

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

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

# print(a_str, b_str)

if a_str == b_str:
    print(a_str)
elif a_str > b_str:
    print(b_str)
else:
    print(a_str)

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(' '))
min = min(a, b)
max = max(a, b)

out = [str(min) for i in range(max)]
print(''.join(out))

Submission status: Accepted

Solution code:
a, b = [int(i) for i in 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())
A = ''
B = ''
for i in range(b):
    A += str(a)
for j in range(a):
    B += str(b)
C = []
C.append(A)
C.append(B)
D = sorted(C)
print(D[0])

Submission status: Accepted

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

Submission status: Accepted

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

a2 = int(a)
b2 = int(b)

a3 = a * b2
b3 = b * a2

arr = [a3, b3]
arr.sort()
print(arr[0])

Submission status: Accepted

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

Submission status: Accepted

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

a_ans = 0
if a <= b:
    for i in range(b):
        a_ans += a * (10 ** i)
    print(a_ans)

b_ans = 0
if b < a:
    for i in range(a):
        b_ans += b * (10 ** i)
    print(b_ans)

Submission status: Accepted

Solution code:
a, b=map(int, input().split())
ans1=[]
ans2=[]
if b<=a:
    for i in range(a):
        ans1.append(b)
else:
    for i in range(b):
        ans2.append(a)

if b<=a:
    ans1=int("".join(map(str, ans1)))
    print(ans1)
else:
    ans2=int("".join(map(str, ans2)))
    print(ans2)

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:
# -*- coding: utf-8 -*-

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, b) = [int(e) for e in lines[0].split(" ")]

    return (a, b)


def solve(a, b):

    x = str(a) * b 
    y = str(b) * a
    
    result = x
    if y < x:
        result = y

    return result
    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()
a_w = a * int(b)
b_w = b * int(a)

if a > b:
  print(b_w)
else:
  print(a_w)

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 aa < bb:print(aa)
else :print(bb)

Submission status: Accepted

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

Submission status: Accepted

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

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

s = [s1, s2]
s.sort()

print(s[0])

Submission status: Accepted

Solution code:
a, b = 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] = map(int, input().split())
if a < b:
    for i in range(b):
        print (a, end="")
else:
    for i in range(a):
        print (b, end="")

Submission status: Accepted

Solution code:
a,b=list(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()
A = a * int(b)
B = b * int(a)
l = sorted([A , B])
print(l[0])

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
A=[]
B=[]
for i in range(int(b)):
    A.append(a)
for k in range(int(a)):
    B.append(b)
N="".join(A)
M="".join(B)
q=sorted([N,M])
print(q[0])

Submission status: Accepted

Solution code:
F = [int(f) for f in input().split()]
a = F[0]
b = F[1]

for i in range(max(a,b)):
    print(min(a,b), end="")

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 = map(int, input().split())
if (A==B):
    Yes=[str(A)]*A

elif (A>B):
    Yes=[str(B)]*A
else:
    Yes=[str(A)]*B

s = ''.join(Yes)
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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

A = int(A[0])
B = int(B[0])

liA = []
liB = []

for a in str(A):
    liA.append(int(a))

for b in str(B):
    liB.append(int(b))


for i in range(len(min(liA, liB)) - 1):
    if liA[i] < liB[i]:
        print(A)
        break
    elif liB[i] < liA[i]:
        print(B)
        break
else:
    print(A)

Submission status: Accepted

Solution code:
a,b = input().split()
a_1 = a
b_1 = b
for i in range(int(b)-1):
    a_1 += a
for i in range(int(a)-1):
    b_1 += b
l = [a_1,b_1]
l.sort()
print(l[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=list(map(int,input().split()))
a=N[0]
b=N[1]
if a>b:
  B=str(b)
  print(B*a)
else:
  A=str(a)
  print(A*b)

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
A=[a]*b
B=[b]*a
As="".join(map(str,A))
Bs="".join(map(str,B))
Ai=int(As)
Bi=int(Bs)
if a>b:
    print(str(Bi))
else:
    print(str(Ai))

Submission status: Accepted

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

if a < b:
    ans = [str(a)] * b
else:
    ans = [str(b)] * a

print(''.join(ans))

Submission status: Accepted

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

left = ""
right = ""

for i in range(b):
  left += str(a)
for i in range(a):
  right += str(b)

nlist = [str(right), str(left)]
nlist.sort()

print(nlist[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Submission status: Accepted

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

if _a >= _b:
    print(''.join([b for i in range(_a)]))
else:
    print(''.join([a for i in range(_b)]))

Submission status: Accepted

Solution code:
S=list(map(int,input().split()))
S1=str(S[0])
S2=str(S[1])
S3=S1*S[1]
S4=S2*S[0]
if S[0]<=S[1]:
    print(S3)
else:
    print(S4)

Submission status: Accepted

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

Submission status: Accepted

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

if(N<=M):
    for i in range(M):
        ans = ans + str(N)
else:
    for i in range(N):
        ans = ans + str(M)
        
print(ans)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
a1 = a
b1 = b
aa = str(a)
sa = aa * b1
bb = str(b)
sb = bb * a1
if(int(sa) >= int(sb)):
    print(sa)
else:
    print(sb)

Submission status: Accepted

Solution code:
inputs = input().strip().split()

A = inputs[0] * int(inputs[1])
B = inputs[1] * int(inputs[0])
print(A if A < B else B)

Submission status: Accepted

Solution code:
hoge = input()
tmp = hoge.split()

tmp1 = tmp[0] * int(tmp[1])
tmp2 = tmp[1] * int(tmp[0])

piyo = [tmp1,tmp2]
piyo.sort()
print(int(piyo[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:
ai,bi = list(input().split())

a = ai*int(bi)
b = bi*int(ai)

if int(ai) <= int(bi):
    print(a)
else:
    print(b)

Submission status: Accepted

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

ans_a = a
ans_b = b
for i in range(b-1):
 ans_a =(ans_a*10) + a

for i in range(a-1):
 ans_b =(ans_b*10) + b

if ans_a == ans_b:
 print(ans_a)
else:
 list = [str(ans_a),str(ans_b)]
 list.sort()
 print(list[0])

Submission status: Accepted

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

mi, ma = min(a, b), max(a, b)

print(str(mi) * ma)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
X = 0
Y = 0
for i in range(B):
    X += A * (10 ** i)
for i in range(A):
    Y += B * (10 ** i)
if A >= B :
    print(Y)
else:
    print(X)

Submission status: Accepted

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

Submission status: Accepted

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