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

import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入力が早いが使える時に使っていこう
from operator import mul
from functools import reduce
from collections import Counter
#from collections import deque

#input = stdin.readline


j=0
k=0
n=3
r=1
a=[0]
#n=int(input())
#r=int(input())
#print(M)
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"


#number_list=list(map(int, input().split(" ")))#数字の時
#print(number_list)
"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#メモ
for i in number_list:#こっちの方がrage使うより早いらしい
    print(number_list[i-1])#

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''
#array=[input().split()for i in range(N)]
#print(type(array[0][0]))
#print(array)
"正方行列にstr型の値を入力"
'''

#brray=[list(map(int, input().split(" ")))for i in range(N)]
#print(type(brray[0][0]))
#print(brray)
'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"
#以下に別解を記載
#N, M = [int(i) for i in input().split()]
'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()
#a=[int(i) for i in s]
#print(a[0])
#print([a])
#単数値．桁ごとに分割したい．入力と出力は以下の通り
#イメージとして1桁ごとにリストに値を入れているかんじ
#intを取ると文字列分解に使える
'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()#str style 何個でもいけることが多い
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''


#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"


#a,b=map(int, input().split())  #int style 複数数値入力　「A B」みたいなスペース空いた入力のとき

#なんかうまく入力されるけど
#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)
#複数行の数値を入力して正方行列を作成


##############################################################################################
##############################################################################################
#under this line explains example calculation



'''
コンビネーションの組み合わせの中身を出力する形式
for i in itertools.combinations(brray, 2)
combinationsをpermutationsにすれば順列になる
今回なら(abc133B)
入力
1 2
5 5
-2 8
出力
[[1, 2], [5, 5], [-2, 8]]
もちろん一次元リストでも使えるし
何よりiもリストのように使えるので便利
'''

#nCr combination
'''
def cmb(n,r):
    #When n < r , this function isn't valid
    r= min(n-r,r)
    #print(n,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    #flochart mul(n,n-1)=x
    #next     mul(x,n-2)........(n-r+1,n-r)
    #mul read a,b and returns a*b

    under = reduce(mul, range(1, r+1))
    #print(over, under)
    #reduce is applied mul(1,2)=2
    #next   mul(2,3)=6
    #next   mul(6,4)=4.........last(r!,r+1)=r+1!

    return over // under
    #// is integer divide
    #calc example 5C2
    #over=5*4*3
    #under=3*2*1
a = cmb(n, r)
#print(a)
'''

'''
import itertools
from itertools import combinations_with_replacement

combinationについて
以下の違いを意識しよう
combinations() p, r 長さrのタプル列、ソートされた順で重複なし

combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複あり


使用例 　　　　　　　　　　　                  出力　　
combinations('ABCD', 2)　　　　　　　　　　　　AB AC AD BC BD CD

combinations_with_replacement('ABCD', 2)　　 AA AB AC AD BB BC BD CC CD DD
'''



'''
#集計
#example
#a=[2,2,2,3,4,3,1,2,1,3,1,2,1,2,2,1,2,1]
#a=Counter(a)
for i in a.most_common(n):print(i)
#most_common()メソッドは、出現回数が多い要素順にCounterオブジェクトを並び替えます。
#引数にint型の数字nを設定した場合は、出現回数が高い上位ｎ個の要素を返します。
#何も設定しなければ、コンテナ型にあるすべての要素を出現回数の順番に並び替えたタプル型オブジェクトを返します。
#out put
#(2, 8)
 #(1, 6)
#(3, 3)
#(4, 1)
'''


#二部探索(binary search)
#A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6]
#print(A)
#index = bisect.bisect_left(A, 5) # 7 最も左(前)の挿入箇所が返ってきている
#A.insert(index, 5)
#print(index)
#print(A)
'''
bisect.bisect_left(a, x, lo=0, h=len(a))
引数
a: ソート済みリスト
x: 挿入したい値
lo: 探索範囲の下限
hi: 探索範囲の上限
(lo, hiはスライスと同様の指定方法)
bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。
'''

'''
素数の判定
'''


def is_prime(n):
    if n == 1: return False

    for k in range(2, int(np.sqrt(n)) + 1):
        #sqrt(n)+1以上は考えて約数はないので却下
        if n % k == 0:
            return False
            #割り切れたらFalse
    return True


'''
npのmaxとmaximumの違い
xs = np.array([1, -2, 3])
np.max(xs, 0)
この出力は3となります．[1, -2, 3]と0の4つの数字のうち，最も大きい値を出力します．

一方で，[max(1, 0), max(-2, 0), max(3, 0)]を出力したい時があります．
その時は，numpyのmaximum関数を用います．

xs = np.array([1, -2, 3])
np.maximum(xs, 0)  # [1, 0, 3]

'''

def factorial(x, mod=10**9+7):
    # x!
    # 階乗
    # ex) factorial(5) = 120
    tmp = 1
    for i in range(1, x+1):
        tmp = (tmp * i) % mod
    return tmp
    '''
    Basically, when you do a**d % n, you actually have to calculate a**d, which could be quite large.
    But there are ways of computing a**d % n without having to compute a**d itself, and that is what pow does.
    '''


########################################################################
########################################################################
#b2=a[:]  #1次元のときはコピーはこれで良い
#print(b2)

#a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
#b3=copy.deepcopy(a)  #2次元配列はこうコピーする
#print(b3)

def main():

    steps=0
    state=0
    w=1
    j=0
    k=0
    #n=int(input())
    a,b=map(int, input().split(" "))
    c=[]
    dic={}
    for i in range(b):
        c.append(str(a))
    s=''.join(c)
    #dic.apped(s)#キーを指定しないとエラーが出る

    dic['k1']=s
    s=''
    c=[]
    #print(c)
    for i in range(a):
        c.append(str(b))
    s=''.join(c)
    dic['k2']=s
    dic2=sorted(dic.items(), key=lambda x:x[1])
    #dic2はこの段階でlistオブジェクトになってる
    #print(dic2)
    print(dic2[0][1])

    #nl=list(map(int, input().split(" ")))#数字の時
    #s=input()
    #a=[int(i) for i in s]#int取るとstrでも行ける
    #print(a)
    #brray=[list(map(int, input().split(" ")))for i in range(N)
    #print(brray)


    for i in range(1,n+1,2):#これで1個飛ばしループになる
     pass
     #print(i)

    l = ['aaa', 'bbb', 'ccc']

    #s = ''.join(l)
    #print(s)
    # aaabbbccc

    #if state in known_states and not flag: # state => 2 steps => 5
        #こうやってある要素がリストの中にあるか探すのか
    #print(f'steps: {steps}, state: {state}')
    #こう書いてあるとデバックしやすい

    #dp= [[0]*3 for i in range(5)]#列　行
    #dp用の0の入ったやつ
    #dp= [[0]*(w+1) for i in range(n+1)]#0からwまでのw+1回計算するから
    #print(dp)＃初期条件が入る分計算回数+1列分必要(この場合は判断すべきものの数)
    DP = np.zeros(w+1, dtype=int)#これでも一次元リストが作れる
    exdp=np.zeros((3,4)) # ３×４の２次元配列を生成。2次元ならこう
    #dtypeは指定しないとfloatになる
    #for i in range(n):#ちょっとした入力に便利
    #    a, b = map(int, input().split())
        #dp[i][0] += [a]
        #これだとintとlistをつなぐことになって不適
    #    dp[i] += [a]
    #    dp[i] += [b]
        #これはうまくいく
        #やり方はいろいろあるということ
    #print(dp)


    #brray=[list(map(int, input().split(" ")))for i in range(N)
    #print(brray)



    '''
    入力
    1234
    出力
    [1, 2, 3, 4]
    '''
    pin_l=["x" for i in range(10)]#内包表記に慣れろ
    #print(pin_l)

    ls = ["a", "b", "c", "d", "e"]


    #print(ls[2:5])
    #スライスでの取得

    #print(ls[:-3])
    #一番左端から右から3番目より左まで取得

    #print(ls[:4:2])
    #スライスで1個飛ばしで取得
    #ないときは左端スタート
    #始点のインデックス番号 : 終点のインデックス番号 : スキップする数+1
    #print(ls[::2])
    '''
    lsというリストの場合に、1つ飛びの値を取得したい場合には
    ls[::2]
    のようにします。こうすると、
    ["a", "c", "d"]と出力される
    '''

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
a,b=map(int,stdin.readline().split())
if(a<=b):
    print(str(a)*b)
else:
    print(str(b)*a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(''.join([str(min(a, b)) for i in range(max(a, b))]))

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

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

if n > m :
  for i in range(n):
    print(m, end='')
else :
  for i in range(m):
    print(n, end='')

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# ABC152B

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
m = str(a)*int(b)
n = str(b)*int(a)
l = [m, n]
l.sort()
print(l[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=map(int,input().split())

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

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:
c,d=map(int,input().split())
s=1
a=max(c,d)
b=min(c,d)
for i in range(a-1):
    s=10*s+1
print(b*s)

Submission status: Accepted

Solution code:
a, b = 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 = list(map(str, input().split()))

A = [a] * int(b)
B = [b] * int(a)
ab = "".join(A)
ba = "".join(B)

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

Submission status: Accepted

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

Submission status: Accepted

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

p=a*int(b)
q=b*int(a)
print(min(p,q))

Submission status: Accepted

Solution code:
# from math import ceil,sqrt,log,gcd
# def ii():return int(input())
# def si():return input()
# def mi():return map(int,input().split())
# def li():return list(mi())



n,m=map(int,input().split())

if(n<m):
    c=chr(48+n)
    print(c*m)
else:
    c=chr(48+m)
    print(c*n)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def main():
    a, b = map(int, input().split())
    s1 = ''.join([chr(a + ord('0'))] * b)
    s2 = ''.join([chr(b + ord('0'))] * a)
    x = int(s1)
    y = int(s2)
    print(max(x, y))

if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a_str, b_str = input().split()

a_int = int(a_str)
b_int = int(b_str)

if a_str*b_int >= b_str*a_int:
    print(b_str*a_int)
else:
    print(a_str*b_int)

Submission status: Accepted

Solution code:
a,b = (int(i) for i in input().split())
s1 = ""+a*str(b)
s2 = ""+b*str(a)
print(min(s1,s2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import fileinput

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

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

print(min(ab, ba))

Submission status: Accepted

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

Submission status: Accepted

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

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

for j in range(a):
    bb += str(b)

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

Submission status: Accepted

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

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

else:
    bbb = str(b)*a
    print(bbb)

Submission status: Accepted

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

if a==b:
    print(str(a)*b)
else:
    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:
  for i in range(a):
    print(b, end='')
else:
  for i in range(b):
    print(a, end='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat May  9 01:31:32 2020

@author: shinba
"""
a,b = map(int,input().split())

if a >= b:
    print("{}".format(b)*a)
else:
    print("{}".format(a)*b)

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

ans = ''
for _ in range(max(S)):
  ans += str(min(S))
  
print(ans)

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
ans = ''
if a <= b:
    for i in range(b):
        ans += '{}'.format(a)
else:
    for i in range(a):
        ans += '{}'.format(b)
print(ans)

Submission status: Accepted

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

else:
    print((max([a,b]))*str(min([a,b])))

Submission status: Accepted

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

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

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())
out=[]
if a <= b:
    for i in range(b):
        out.append(str(a))
    print("".join(out))
else:
    for i in range(a):
        out.append(str(b))
    print("".join(out))

Submission status: Accepted

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

num = []
num.append(a * int(b)) 
num.append(b * int(a))
num.sort()
print(num[0])

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a > b:
    a,b = b,a
S = [str(a) for i in range(b)]
print("".join(S))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
a_list = [str(a)] * b
a_str = ''.join(a_list)

b_list = [str(b)] * a
b_str = ''.join(b_list)

list = [a_str, b_str]
list.sort(reverse=False)
print(list[0])

Submission status: Accepted

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

Submission status: Accepted

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

a_fixed = a * int(b)
b_fixed = b * int(a)

result = [a_fixed , b_fixed]
result.sort()

print(result[0])

Submission status: Accepted

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

Submission status: Accepted

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

print(str(a)*b)

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:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
import sys
def I(): return int(input())  # '123' -> 123
def Is(): return map(int, input().split())  # '123 456' -> 123, 456
def LI(): return list(map(int, input().split()))  # '123 456' -> [123, 456]
def TI(): return tuple(map(int, input().split()))  # '123 456' -> (123, 456)
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  # 'aa bb' -> 'aa','bb' or ['aa','bb']
def LS(): return list(input())  # 'abc123' -> ['a','b','c','1','2','3']
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

a, b = Is()
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())
A = str(a) * b
B = str(b) * a
d = {A, B}
print(sorted(d)[0])

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:
# B - Comparing Strings

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

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

a = str(i) * j
b = str(j) * i

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

Submission status: Accepted

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

a_list = str(a) * b
b_list = str(b) * a

if a_list <= b_list:
    print(a_list)
else:
    print(b_list)

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    a, b = map(int, stdin.readline().split())
    print(str(a) * b) if b > a else print(str(b) * a)


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

X = 0
if a < b:
    for i in range(b):
        X += a * pow(10,i)

else :
    for i in range(a):
        X += b * pow(10,i)


print(X)

Submission status: Accepted

Solution code:

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

AA=str(A)
BB=str(B)

Aans=""
Bans=""

i=0
while i<B:
    Aans=Aans+AA
    i+=1
j=0
while j<A:
    Bans=Bans+BB
    j+=1


print(min(Aans,Bans))

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

bg=max(a,b)
sm=min(a,b)

print(str(sm)*bg)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for _ in range(1, b) :
    a_str = a_str + str(a)

for _ in range(1, a) :
    b_str = b_str + str(b)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
lis = sorted([str(a)*b, str(b)*a])
print(lis[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=input().split()
s=a*int(b)
t=b*int(a)
print(min(s,t))

Submission status: Accepted

Solution code:

A, B = list(map(int, input().split()))
ans = ""
if A >= B:
  for i in range(A):
    ans = ans + str(B)
else:
  for i in range(B):
    ans = ans + str(A)
    
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 = map(str, input().split())
print (min((a*9)[0:int(b)],(b*9)[0:int(a)]))

Submission status: Accepted

Solution code:
#########行列読み込み ##############################################
"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""
##################################################################
#########入力系####################################################
"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""
##################################################################

#########行列読み込み ##############################################
"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""
##################################################################
#########入力系####################################################
"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""
##################################################################

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

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

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

print(min(A,B))

Submission status: Accepted

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

print(solve())

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=min(a,b)
d=max(a,b)
ans = 0
for i in range(d):
  ans += c*(10**i)
print(ans)

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)*a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

A, B = mi()

print(str(min(A, B))*max(A, B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
s1 = ""
s2 = ""
for i in range(a):
    s1 += str(b)
for i in range(b):
    s2 += str(a)
print(s1) if s1 <= s2 else print(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:
N,M=input().split()
print(N*int(M) if N*int(M)<M*int(N) else M*int(N))

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

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

Submission status: Accepted

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

l = ['{}'.format(a)*b, '{}'.format(b)*a]
l.sort()
print(l[0])

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=map(int,input().split())
suma = 0
diga = 0
sumb = 0
digb = 0
for i in range(a):
    sumb += b * 10 **digb
    digb += 1
for j in range(b):
    suma += a * 10 **diga
    diga +=1
if int(suma) > int(sumb):
    print(suma)
else:
    print(sumb)

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

for i in range(0, b):
    aList.append(str(a))

for i in range(0, a):
    bList.append(str(b))


if "".join(aList) < "".join(bList):
    print("".join(aList))
else:
    print("".join(bList))

Submission status: Accepted

Solution code:
l  = [int(x) for x in input().split()]
a, b = l[0], l[1]
if a > b:
    print(int(str(b)*a))
else:
    print(int(str(a)*b))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a = N[0]; b = N[1]
result = 0
if a<b:
    for i in range(b):
        result += a*10**i
else:
    for i in range(a):
        result += b*10**i

print(result)

Submission status: Accepted

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

string_a  = str(a) * b
string_b = str(b) * a

d=[]
d.append(string_a)
d.append(string_b)

s= sorted(d)

print(s[0])

Submission status: Accepted

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

ans1=""
ans2=""
l=[]
for i in range(int(a)):
  ans1+=b

for i in range(int(b)):
  ans2+=a

l=[ans1,ans2]
l.sort()
print(l[0])

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())
ans = ""

if a<b:
    for i in range(b):
        ans += str(a)
else:
    for i in range(a):
        ans += str(b)

print(ans)