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


min_word = ""
for _ in range(max(a, b)):
    min_word += str(min(a, b))

print(min_word)

Submission status: Accepted

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

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

Submission status: Accepted

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

if b > c:
  print(c)
else:
  print(b)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
A=str(a)*b
B=str(b)*a
for i in range(min(len(A),len(B))):
  if int(A[i])>int(B[i]):
    print(B)
    break
  else:
    print(A)
    break

Submission status: Accepted

Solution code:
import sys
a, b = [int(e) for e in sys.stdin.readline().rstrip().split(" ")]
print(str(min([a, b])) * max([a, b]))

Submission status: Accepted

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


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

Submission status: Accepted

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

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

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 = 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:
# 問題文

# 1桁の正整数 a ,b が与えられます。
# 整数 a を b 回繰り返してできる文字列と 整数 b を a回繰り返してできる文字列のうち、
# 辞書順で小さい方を答えてください。

# 制約
# 1 ≤ a ≤ 9
# 1 ≤ b ≤ 9
# a,bは整数

# 入力
# 入力は以下の形式で標準入力から与えられる。
# a b


# 出力
# 2つの文字列のうち辞書順で小さい方を出力せよ。
# (2 つの文字列が等しいときは、そのうちどちらかを出力せよ。)

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())
print(str(min(a,b)) * max(a,b))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

A = ''
B = ''

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

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

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

Submission status: Accepted

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

l = []
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_b=str(a)*int(b)
b_a=str(b)*int(a)
if a_b>b_a :
    print(b_a)
else:
    print(a_b)

Submission status: Accepted

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

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

print(b_a) if (a_b > b_a) else print(a_b)

Submission status: Accepted

Solution code:
get = list(map(int, input().split()))
a = get[0]
b = get[1]
if a <= b:
  print(str(a) * b)
elif a > b:
  print(str(b) * a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()
a2 = []
b2 = []
for _ in range(int(b)):
  a2.append(a)
for _ in range(int(a)):
  b2.append(b)
a3 = int("".join(a2))
b3 = int("".join(b2))
if a3 > b3:
  print(a3)
else:
  print(b3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A = [a]*b
B = [b]*a

AA = int("".join(map(str, A)))
BB = int("".join(map(str, B)))

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

Submission status: Accepted

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


ra= 0
rb =0

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

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

if ra>=rb:
  print(ra)
else:
  print(rb)

Submission status: Accepted

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

if A > B:
  text = ""
  for i in range(A):
    text = text + str(B)
  print(text)

elif A < B:
  text = ""
  for i in range(B):
    text = text + str(A)
  print(text)

else:
  text = ""
  for i in range(A):
    text = text + str(A)
  print(text)

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

Submission status: Accepted

Solution code:

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

a, b = (a, b) if a < b else (b, a)

print(('%d' % (a)) * b)

Submission status: Accepted

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

ab = int("".join([str(a)] * b))
ba = int("".join([str(b)] * a))
print(ab if ab >= ba else ba)

Submission status: Accepted

Solution code:
def execute(key: int, base: str) -> str:
  s = ""
  for i in range(key):
    s += str(base)
  return s

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

Submission status: Accepted

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

print(''.join(ans))

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

Submission status: Accepted

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

a = input_values[0] * int(input_values[1])
b = input_values[1] * int(input_values[0])

if a < b:
    print(a)
else:
    print(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:
def main(a, b):
    l = sorted([str(a) * b, str(b) * a])
    print(l[0])


if __name__ == "__main__":
    a, b = map(int, input().split())

    main(a, b)

Submission status: Accepted

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

if a <= b:
    for i in range(int(b)):
      f += a
else:
    for i in range(int(a)):
      f += b
print(f)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
q = list(map(int, input().split()))
a = b = 0
for i in range(q[0]):
    a += q[1] * 10**i
for j in range(q[1]):
    b += q[0] * 10**j
if a > b:
    print(a)
else:
    print(b)

Submission status: Accepted

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

print(str(sorted(i)[0]) * sorted(i)[1])

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
a_list =[]
b_list =[]

for i in range(int(b)):
   a_list.append(a)

for i in range(int(a)):
   b_list.append(b)    

map_result = map(str, a_list)
result_a = ''.join(map_result)
map_result = map(str, b_list)
result_b = ''.join(map_result)

sorted_list = sorted([result_a,result_b])
print(sorted_list[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a,b = map(int,input().split())
aary = []
bary = []

for i in range(b):
    aary.append(a)
for i in range(a):
    bary.append(b)

anum = int("".join(map(str,aary)))
bnum = int("".join(map(str,bary)))

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

Submission status: Accepted

Solution code:

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

#aの方が大きい
if a < b:
    a,b=b,a

for i in range(a):
    print(b,end = '')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    N, M = input().split()
    
    if N>=M:
        print(M*int(N))
    else:
        print(N*int(M))

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

Submission status: Accepted

Solution code:
numlist = list(map(int, input().split()))
num = sorted(numlist)
ans = ''

for i in range(num[1]):
    ans  = ans + str(num[0])

print(int(ans))

Submission status: Accepted

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


def solve(a: int, b: int):
    if a < b:
        print(str(a)*b)
    if b < a:
        print(str(b)*a)
    if a == b:
        print(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:
l = sorted(map(int, input().split()))
print(str(l[0])*l[1])

Submission status: Accepted

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

if int(str(list_num[0])*list_num[1]) > int(str(list_num[1])*list_num[0]):
    print(int(str(list_num[0]) * list_num[1]))
else:
    print(int(str(list_num[1]) * list_num[0]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = input().split()
d = {"a": "0", "b": "0"}
d["a"] = x * int(y)
d["b"] = y * int(x)
print(min(d["a"], d["b"]))

Submission status: Accepted

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

num1 = ""
num2 = ""
num1 = a * int(b)
num2 = int(a) * b
list = [num1, num2]
list2 = sorted(list)
print (list2[0])

Submission status: Accepted

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

Submission status: Accepted

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

num1 = ""
num2 = ""
for i in range(int(a)):
  num1 = num1 + b
for i in range(int(b)):
  num2 = num2 + a
list = [num1, num2]
list2 = sorted(list)
print (list2[0])

Submission status: Accepted

Solution code:
n, m=input().split(' ')
n = int(n)
m = int(m)
nn = 0
mm = 0
for i in range(m):
	nn = nn + n * pow(10, i)
for i in range(n):
	mm = mm + m * pow(10, i)    
if n < m:
  print(nn)
else:
  print(mm)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ans=str()
cnt=0
if a==b:
    while(cnt<b):
        ans+=str(b)
        cnt+=1
    print(ans)
    exit()

elif a>b:
    while(cnt<a):
       ans+=str(b)
       cnt+=1
    print(ans)
    exit()

else:
    while(cnt<b):
        ans+=str(a)
        cnt+=1
    print(ans)
    exit()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
hoge=0.1111111111111111
if(a>b):
  print(b*int(hoge*10**a))
else:
  print(a*int(hoge*10**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:
a,b = map(int,input().split())
s = ''
if a> b:
    for i in range(a):
        s = s+str(b)
else:
    for i in range(b):
        s = s+str(a)
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
a = str(A[0])
b = str(A[1])
list=[]
for i in range(A[1]-1):
  a += str(A[0])
list.append(a)
  
for i in range(A[0]-1):
  b += str(A[1])
list.append(b)

print(sorted(list)[0])

Submission status: Accepted

Solution code:
def main():
    x, y = [int(i) for i in input().split()]
    if x > y:
        print(str(y) * x)
    elif x < y:
        print(str(x) * y)
    else:
        print(str(x) * y)
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())
print(str(min(a, b)) * max(a,b))

Submission status: Accepted

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

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

else:
    print(str(a)*b)

Submission status: Accepted

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

Submission status: Accepted

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

ca = ""
cb = ""

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

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

print(min(ca, cb))

Submission status: Accepted

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

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

Submission status: Accepted

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

ans1=''
for _ in range(int(b)):
  ans1+=a
ans2=''
for _ in range(int(a)):
  ans2+=b
ans=[ans1,ans2]
ans.sort()
print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

num1 = ''
num2 = ''

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

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

list = [num1,num2]

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if int(a)==int(b):
    print(str(c))

elif int(a)<int(b):
    print(str(c))

else:
    print(str(d))

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

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

import sys
sys.setrecursionlimit(300000)


def solve(a: int, b: int):
    A = str(a) * b
    B = str(b) * a
    print(min(A, B))
    return

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a,b = LS()

    return min(a,b) * int(max(a,b))


print(main())

Submission status: Accepted

Solution code:
a,b=sorted(input().split());print("".join(a for i in range(int(b))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

aa = ''.join([str(a) for i in range(b)])
bb = ''.join([str(b) for j in range(a)])

lst = [aa, bb]
print(sorted(lst)[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
#B - Comparing Strings★
#joinできるのはstr
a, b = list(map(int,input().split()))
A = [str(a) for i in range(b)]
B = [str(b) for i in range(a)]
A = ''.join(A)
B = ''.join(B)
print(min(A,B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
a, b = stdin.readline().rstrip().split()
A = a*int(b)
B = b*int(a)
if A <= B:
    print(A)
else:
    print(B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
aa=0
bb=0
for i in range(b):
  aa+=a*(10**i)
for i in range(a):
  bb+=b*(10**i)

ans=max(aa,bb)

print(ans)

Submission status: Accepted

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

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:
def get_smaller():
    N, M = input().split(" ")

    smaller = N if N < M else M
    bigger = M if N < M else N

    rst = ""
    for _ in range(int(bigger)):
        rst += smaller
    print(rst)

get_smaller()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  a,b = map(int,input().split())
  ans = check(a,b)
  print(ans)
  
def check(n,m):
    num = ""
    if n < m:
        for i in range(m):
            num = str(num) + str(n)
        return num
    elif n > m:
        for i in range(n):
            num = str(num) + str(m)
        return num
    else:
        for i in range(n):
            num = str(num) + str(m)
        return num

main()

Submission status: Accepted

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

a_string = a * int(b)
b_string = b * int(a)

output = sorted([a_string, b_string])
print(output[0])

Submission status: Accepted

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

def main():
    n = list(map(int, input().split()))
    if n[0] > n[1]:
        n[0], n[1] = n[1], n[0]
    ans = 0
    for i in range(n[1]):
        ans += n[0] * 10**i
    print(ans)
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!python3.4.3

a, b = input().split(' ')

a_ = a * int(b)
b_ = b * int(a)

if a_ <= b_:
    print(a_)
elif b_ <= a_:
    print(b_)

Submission status: Accepted

Solution code:
s = list(map(int,input().split()))
a = s[0]
b = s[1]
c = 0
if a < b:
    for i in range(b):
        c = c + (10**i) * a
else:
    for i in range(a):
        c = c + (10**i) * b
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def printlexsmaller(n,m):
  str1 = "".join([str(n) for x in range(m)])
  str2 = "".join([str(m) for x in range(n)])
  return str1 if str1 < str2 else str2

input = list(map(int, input().rstrip().split()))
print(printlexsmaller(*input))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = 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())
word = ''
res_word = ''
i = 0
if a <= b:
    word = str(a)
    i = b
else:
    word = str(b)
    i = a

for j in range(0, i):
    res_word += word

print(res_word)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(a, b):
    return min(str(a)*b, str(b)*a)

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

Submission status: Accepted

Solution code:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


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


def read_str_list():
    return input().split()


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


def read_str():
    return input()


def main():
    a, b = read_int_list()
    if a > b:
      res = str(b) * a
    else:
      res = str(a) * b
    print(res)


main()

Submission status: Accepted

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

s = ""
if a > b:
    for i in range(a):
        s += str(b)
elif b > a:
    for i in range(b):
        s += str(a)
else:
    for i in range(b):
        s += str(a)
print(s)

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
str_1 = ""
str_2 = ""
list_1 = []
for i in range(m):
  str_1 += str(n)
list_1.append(str_1)
for i in range(n):
  str_2 += str(m)
list_1.append(str_2)
sort_list = sorted(list_1)
print(sort_list[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
  a, b = map(int, sys.stdin.readline().split())
  s = str(b)
  s1 = s*a
  s = str(a)
  s2 = s * b
  print(s1) if s1 <= s2 else print(s2)
if __name__ == "__main__":
  main()

Submission status: Accepted

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

def main():
  a, b = map(int, input().strip().split())
  if a > b:
    a, b = b, a
  print(str(a)*b)

if __name__=='__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=list(map(lambda x:x,input().split()))
if(a[1]>a[0]):
  print(a[0]*int(a[1]))
else:
  print(a[1]*int(a[0]))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b = map(int, input().split())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
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 = str(b)

c =""
d=""

for i in range(b):
    c = c+A;

for i in range(a):
    d = d+B
    
if c > d:
    print(d)
else:
    print(c)

Submission status: Accepted

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

aa = a * bn
bb = b * an

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

Submission status: Accepted

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

# 小さい値を出力文字にする。(辞書順が先)
min_val = min([a, b])
str_len = max([a, b])

for i in range(str_len):
    print(str(min_val), end="")
print()

Submission status: Accepted

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

if a[0] >= a[1]:
  for i in range(a[0]):
    list += str(a[1]) 
else:
  for i in range(a[1]):
    list += str(a[0]) 
    
print(''.join(list))

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:
s,t=map(int,input().split())
x=str(s)*t
y=str(t)*s
a=[x,y]
a.sort()
print(a[0])