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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a>b:
  c=a
  a=b
  b=c
print('{}'.format(a)*b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = str(N)*M
y = str(M)*N

aa = [x, y]

aa.sort()

print(aa[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if n <= m:
  print(a)
else:
  print(b)

Submission status: Accepted

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

ans = []
ans.append(str(a)*b)
ans.append(str(b)*a)
ans.sort()
print(ans[0])

Submission status: Accepted

Solution code:
# ABC 152 B

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

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

Submission status: Accepted

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

st1=""
for i in range(int(b)):
    st1 += a
st2=""
for i in range(int(a)):
    st2 += b

if st1>=st2:
    print(st2)
else:
    print(st1)

Submission status: Accepted

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

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:
def value(x,y):
    s=0
    for i in range(y):
        s += x*10**i
    return s
a,b=map(int,input().split())
if a<b:
    print(value(a,b))
else:
    print(value(b,a))

Submission status: Accepted

Solution code:
a,b = map(str,input().split())
lst_a = [a]*int(b)
lst_b = [b]*int(a)
lst = sorted([lst_a,lst_b])
print("".join(lst[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_char=str(a)
b_char=str(b)
answer=['','']
for i in range(b):
    answer[0]+=a_char
for i in range(a):
    answer[1]+=b_char
answer.sort()
print(answer[0])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from itertools import product, permutations, combinations
from bisect import bisect_right,bisect_left
a,b=map(str, input().split())
ab = ''.join([a for i in range(int(b))])
ba = ''.join([b for i in range(int(a))])
print(sorted([ab, ba]).pop(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:
def main():
    n,m = map(int,input().split())
    l = min(n,m)
    h = max(n,m)
    ans=0
    for i in range(h):
        ans = ans*10+l
    print(ans)

if __name__=='__main__':
    main()

Submission status: Accepted

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

if __name__ == '__main__':
  run()

Submission status: Accepted

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

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

achr = str(a)
bchr = str(b)

astr = achr * b
bstr = bchr * a

if astr <= bstr:
    print(astr)
else:
    print(bstr)

Submission status: Accepted

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

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

if ans_1 < ans_2:
    print(ans_1)
else:
    print(ans_2)

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:
if __name__ == '__main__':
    a, b = list(map(int, input().split(" ")))
    s = ""
    if a < b:
        for i in range(b):
            s = s + str(a)
    else:
        for i in range(a):
            s = s + str(b)

    print(s)

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

Submission status: Accepted

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

ab = ''
for i in range(a):
  ab += str(b)
  
ba = ''
for i in range(b):
  ba += str(a)
  
lis = [ab, ba]
lis.sort()
print(lis[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N, M = map(int, input().split())
a=""
for i in range(M):
    a+=str(N)

b=""
for i in range(N):
    b+=str(M)

x=[a,b]
x.sort()
print(x[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(a: int, b: int):
    m = min(a, b)
    M = max(a, b)

    print(str(m) * M)
    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:
n, m = input().split()
s1 = n*int(m)
s2 = m*(int(n))
x = [s1, s2]
x.sort()
print(x[0])

Submission status: Accepted

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

a1 = a*int(b)
b1 = b*int(a)
if a1 == b1:
    print(a1)
else:
    print(max(int(a1),int(b1)))

Submission status: Accepted

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

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

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

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

ans = sorted([A, B])
print(ans[0])

Submission status: Accepted

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

A=''
B=''

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

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

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

Submission status: Accepted

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

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

sa = [str(a)]*b
sb = [str(b)]*a

ans = min(sa,sb)

for i in ans:
    print(i,end = "")

Submission status: Accepted

Solution code:
import queue
import math
import copy
"""
N = int(input())
#S = input()
# (N,M) = (int(i) for i in input().split(" "))
# A = [int(i) for i in input().split()]
A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""

(N,M) = (int(i) for i in input().split(" "))
print("".join([str(min(N,M)) for i in range(max(N,M))]))

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:
lst = list(map(int,input().split()))
lst.sort()
for i in range(lst[1]):
    print(lst[0],end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = [int(s) for s in input().strip().split()]
result = min(str(a) * b, str(b) * a)
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

def rep(a, b):    
    return str(b) * a

if a>b:
    print(rep(a, b))
else:
    print(rep(b, a))

Submission status: Accepted

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

ans1 = 0
for i in range(b):
    ans1 += a * 10 ** i
ans2 = 0
for i in range(a):
    ans2 += b * 10 ** i
tmp = [str(ans1), str(ans2)]
tmp.sort()
print(tmp[0])

Submission status: Accepted

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

Submission status: Accepted

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

ans1 = min(a,b)
ans2 = max(a,b)

for i in range(ans2):
  print(str(ans1),end="")

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

a, b = ril()
x = str(a) * b
y = str(b) * a
print(min(x, y))

Submission status: Accepted

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


def str(ch, c):
    res = 0
    for i in range(c):
        res *= 10
        res += ch

    return res


sa = str(a, b)
sb = str(b, a)

if sa >= sb:
    print(sa)
else:
    print(sb)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ab = [str(a)*b,str(b)*a]
ab.sort()
print(ab[0])

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
ans=""
for i in range(max(n,m)):
    ans+=str(min(n,m))
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    a, b = [int(x) for x in stdin.readline().rstrip().split()]
    x = str(a) * b
    y = str(b) * a
    print(x if x < y else y)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(s_1 if s_1<=s_2 else s_2)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(max(A,B)):
  print(str(min(A,B)),end="")
print("\n",end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def main():
    a, b = map(int, input().split())
    ab = ''.join([str(a)] * b)
    ba = ''.join([str(b)] * a)
    print(ab if ab < ba else ba)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(base*rep)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = input().split()
a_value = ''
b_value = ''
if int(a)<int(b):
    for i in range(int(b)):
        a_value += a
    print(a_value)
else:
    for i in range(int(a)):
        b_value += b
    print(b_value)

Submission status: Accepted

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

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

print("{}".format(min(n, m)) * max(n, m))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(array[0])

Submission status: Accepted

Solution code:
def main():
    from sys import stdin, setrecursionlimit
    #setrecursionlimit(10**9)
    #n = int(stdin.readline()[:-1])   
    #r = stdin.readline()[:-1]
    #n = int(stdin.readline()[:-1])   
    #r = [stdin.readline() for i in range(n)]
    #t = [int(stdin.readline()) for i in range(n)]
    #a = list(map(int, r.split()))
    a, b = map(int, input().split())
    #a = [int(s[i]) for i in range(1, n+1)]
    #a = [list(map(int, r.split())) for i in range(1,n+1)]

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

    #'Yes', 'No', 'YES', 'NO', ':(', 'Yay!'
    #res = 0
    #a, b = map(int, r.split())
    #print()

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def resolve():
    n, m = map(int, input().split())
    a = max(n, m)
    b = min(n, m)

    print(str(b) * a)

resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(min(aa,bb))

Submission status: Accepted

Solution code:


a,b = input().split()

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

Submission status: Accepted

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

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

str_a = str(a) * b
str_b = str(b) * a
print(min(str_a, str_b))

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

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

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 a_str > b_str:
    print(b_str)
else:
    print(a_str)

Submission status: Accepted

Solution code:
# 2020/01/19
# AtCoder Beginner Contest 152 - B

# Input
a, b = input().split()

sa = ""
sb = ""

# Calc
for i in range(int(a)):
    sa = sa + b
for j in range(int(b)):
    sb = sb + a

if sa < sb:
    ans = sa
else:
    ans = sb

# Output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a >= b:
    print("".join([str(b) for _ in range(a)]))
else:
    print("".join([str(a) for _ in range(b)]))

Submission status: Accepted

Solution code:
import bisect

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

    return 0

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ls = []

ls.append(n*int(m))
ls.append(m*int(n))

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

Submission status: Accepted

Solution code:
# coding: utf-8
A, B = map(str, input().split())
print(min(A*int(B), B*int(A)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

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

ans = sorted([str(a)*b, str(b)*a])

print(ans[0])

Submission status: Accepted

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

if a[0]<a[1]:
    print(str(a[0])*a[1])
else:
    print(str(a[1])*a[0])

Submission status: Accepted

Solution code:

def ABC152B():
    a, b = map(int, input().split())
    A = int(str(a) * b)
    B = int(str(b) * a)
    print(max(A, B))

ABC152B()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(max(int(aa), int(bb)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

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

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

Submission status: Accepted

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

aS = []
bS = []
for i in range(a):
  bS.append(str(b))

for i in range(b):
  aS.append(str(a))

if ''.join(aS) > ''.join(bS):
  print(''.join(bS))
else:
  print(''.join(aS))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


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

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

    res = ''

    for i in range(d):
        res += str(c)

    print(res)



main()

Submission status: Accepted

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

ans = ""
for _ in range(b):
  ans += str(a)
print(ans)

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
 

a,b=input().split()

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

if int(a)<int(b):
	print(c)
else:
	print(d)

Submission status: Accepted

Solution code:
from sys import stdin
a, b = [int(i) for i in stdin.readline().rstrip().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

min_num = min(a, b)
max_num = max(a, b)
ans = 0
for i in range(max_num):
    ans += min_num * 10 ** i
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(min(A,B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())

if a<b:
  x=[str(a)]*b
  
else:
  x=[str(b)]*a
print("".join(x))

Submission status: Accepted

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

Submission status: Accepted

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

str_a = str(a) * b
str_b = str(b) * a

res = [str_a,str_b]
res.sort()

print(res[0])

Submission status: Accepted

Solution code:
def main():
    n, m = list(map(int, input().split()))
    if n > m:
        n, m = m, n
    
    print(str(n) * m)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

s = str(n)
l = str(m)

s = s*m
l = l*n

if len(l)>len(s):
    print(l)
elif len(s)>len(l):
    print(s)
else:
    if l>s:
        print(l)
    else: print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# abc152/abc152_b
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    a, b = i2nn()
    print(min(str(a)*b, str(b)*a))
    return

main()

Submission status: Accepted

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

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

print(str(mi) * ma)

Submission status: Accepted

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

ans = a * int(b)

if ans > (b * int(a)):
    ans = b * int(a)

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
a_score = 0
for i in range(1,a+1):
    a_score += b * 10**(i-1)
b_score = 0
for i in range(1,b+1):
    b_score += a * 10**(i-1)
if a_score > b_score:
    print(a_score)
else:
    print(b_score)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	aa,bb = inputMap()

	a = str(aa)
	b = str(bb)

	A = ""
	B = ""

	for i in range(bb):
		A += a

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

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



if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import numpy as np


DEBUG = True
dprint = print if DEBUG else lambda *x : x

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

ss = str(a) * b, str(b) * a

print(min((ss)))

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

Submission status: Accepted

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

if a <= b:
    print("".join([str(a) for _ in range(b)]))
else:
    print("".join([str(b) for _ in range(a)]))

Submission status: Accepted

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


a, b= (int(i) for i in input().split())  
#a = [int(i) for i in input().split()] 
#e = [[int(i) for i in input().split()] for i in range(n)] 

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M= map(int,input().split())
#A =list(map(int,input().split()))
#L = [list(map(str,input().split())) for i in range(N)]

if N >= M:
    for i in range(N):
        print(str(M),end='')
else:
    for i in range(M):
        print(str(N),end='')