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:
listA=[]

try:
    listA = list(input().split())
    #listA<-[1,2,2,3,1]
    #print(listA)
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。

a=listA[0]
b=listA[1]

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

if int(x1) > int(x2):
    print(x1)
else:
    print(x2)

Submission status: Accepted

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

if b < a:
    a, b = b, a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
def func(x,y):
    for i in range(y):
        print('{}'.format(x),end='')

if a>=b:
    func(b,a)
else:
    func(a,b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=[int(k) for k in input().split()]
m=max(x[0],x[1])
n=min(x[0],x[1])
for i in range(0,m):
  print(n,end="")

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

Submission status: Accepted

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

Submission status: Accepted

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

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

min_length = a if a <= b else b
for i in range(min_length):
    if str_a[i] <= str_b[i]:
        answer = str_a
        break
    elif str_b[i] < str_a[i]:
        answer = str_b

print(answer)

Submission status: Accepted

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

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

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


print(axb_text if axb_text < bxa_text else bxa_text)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
for i in range(max(a, b)):
    print(min(a, b), end='')

Submission status: Accepted

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

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

Submission status: Accepted

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


def solve(a: int, b: int):
    str_a = str(a) * b
    str_b = str(b) * a
    print(sorted([str_a, str_b])[0])


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    solve(a, b)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

# count = 0
# val = sum(p[0:k])
# val_lis = [val]
# mx_val = val
# index = 0
# mx_index = 0
# for i,j in enumerate(p[k:]):
#     val = val - p[index] + j
#     val_lis.append(val)
#     index +=1
#     if val > mx_val:
#         mx_index = index
#         mx_val = val 
    
# ans = 0
# for i in range(k):
#     ans += ((p[mx_index + i]+1.0)*(p[mx_index+i]))/ (p[mx_index+i] *2.0)
# print(ans)  




# h = sorted(h,reverse = True)
# print(sum(h[k:]))

# s,t= map(str, input().split())
# a,b= map(int, input().split())
# u = input()
# print("x"*len(u))

# if(u == s):
#     print(a-1,b)
# else:
#     print(a,b-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
small, large = sorted(map(int, input().split()))
print(str(small) * large)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b = (int(x) for x in input().split())
if a>b:
	x = a
	a = b
	b = x
print("%d"%a*b)

Submission status: Accepted

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

Submission status: Accepted

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

import sys

def solve(a, b):
    return str(a) * b if a < b else str(b) * a

def main():
    a, b = [int(s) for s in sys.stdin.readline().split()]

    ans = solve(a, b)

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

if a < b or a == b:
  print(str(a)*b)
elif b < a:
  print(str(b)*a)

Submission status: Accepted

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

str_1 = '{}'.format(a)*b
str_2 = '{}'.format(b)*a
str_1, str_2 = sorted([str_1,str_2])

print(str_1)

Submission status: Accepted

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

a_str = [0] * int(b)
b_str = [0] * int(a)

for i in range(int(b)):
    a_str[i] = a
    
for i in range(int(a)):
    b_str[i] = b
    
if a_str < b_str:
    print(''.join(a_str))
else:
    print(''.join(b_str))

Submission status: Accepted

Solution code:
In = input().split()
a = int(In[0])
b = int(In[1])
if a >= b:
    for x in range(0, a):
        print(b, end="")
else:
    for x in range(0, b):
        print(a, end="")

Submission status: Accepted

Solution code:
input1= input().split(" ")
input1.sort()

print(input1[0]*int(input1[1]))

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, k = (int(z) for z in input().split())
s1 = str(n) * k
s2 = str(k) * n
print(min(s1, s2))

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

la = ''
lb = ''

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

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

if a <= b:
    print(la)
else:
    print(lb)

Submission status: Accepted

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

ans = ""

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

print(ans)

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



min = a if a < b else b
max = b if a <= b else a

ans = 0
for j in range(max):
    ans += (10**j) * min



print(ans)

Submission status: Accepted

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

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

answer = ''

if a_str > b_str:
	for i in range(a):
		answer = answer + b_str
else:
	for i in range(b):
		answer = answer + a_str
print(answer)

Submission status: Accepted

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

J = int(N)
K = int(M)

if N > M:
  print(M*J)
else:
  print(N*K)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
I = list(map(int, input().split()))
a = I[0]
b = I[1]
if not 1 <= a or not a <= 9:
    print("error")
    sys.exit()
if not 1 <= b or not b <= 9:
    print("error")
    sys.exit()

a_str = str(a)
b_str = str(b)
A_str = a_str * b
B_str = b_str * a
if A_str < B_str:
    print(A_str)
else:
    print(B_str)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

ans = min(s1,s2)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

tmp = a
x=''
if b<a:
  a = b
  b = tmp
for _ in range(int(b)):
  x+=a
print(int(x))

Submission status: Accepted

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

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

s = []
s.append(''.join([str(a) for _ in range(b)]))
s.append(''.join([str(b) for _ in range(a)]))

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

Submission status: Accepted

Solution code:
a,b = input().split()
 
print(min(a*int(b),b*int(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 = input().split()
 
print(min(a*int(b),b*int(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 = input().split()
x, y = a*int(b), b*int(a)
L = len(y) if len(x) >= len(y) else len(x)
for l in range(L):
    if int(x[l]) > int(y[l]):
        print(y)
        break
    elif int(x[l]) < int(y[l]):
        print(x)
        break
else:
    if len(x) >= len(y):
        print(y)
    else:
        print(x)

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()
out = ""
if a < b:
    tmp = b
    b = a
    a = tmp
for _ in range(int(a)):
    out += b
print(out)

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 = ''
d = ''

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

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

if c < d:
	print(c)
else:
	print(d)

Submission status: Accepted

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

Submission status: Accepted

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

def keisan(p, q):
    ans = 0
    for i in range(q):
        ans = ans + p*10**(i)
    print(ans)

if a < b :
    keisan(a, b)
else :
    keisan(b, a)

Submission status: Accepted

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

if a>=b:
  l = a
  s = b
else:
  l = b
  s = a

n = 0
for i in range(0,l):
  n = n + s*(10**i)
  
print(n)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

if x < y:
    print(str(x)*y)
else:
    print(str(y)*x)

Submission status: Accepted

Solution code:
N, M = input().split()

l = [N*int(M), M*int(N)]
l = sorted(l)

print(l[0])

Submission status: Accepted

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

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

A = int("".join(A))
B = int("".join(B))

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

c=0
d=0
e=0
f=0


for i in range(b):
	c+=pow(10,i)
d=a*c
for j in range(a):
	e+=pow(10,j)
f=b*e
print(max(d,f))

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

x="".join(list(a*int(b)))
y="".join(list(b*int(a)))
ans=[x,y]
ans.sort()
print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

for j in range(b):
    B = B + a*10**j
    
if a<b:
    print(B)
    
else:
    print(A)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H, N = map(int, readline().split())
dic=[str(H)*N,str(N)*H]
dic.sort()
print(dic[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = [int(x) for x in input().split()]
s1 = ''
s2 = ''
for i in range(a):
	s1 = s1 + str(b)
for i in range(b):
	s2 = s2 + str(a)
n1 = int(s1)
n2 = int(s2)
if (n1>=n2):
	print(n1)
else :
	print(n2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 i in range(a)])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b = input().split(" ")
A = a * int(b)
B = b * int(a)
print(sorted([A, B])[0])

Submission status: Accepted

Solution code:
input_line = input()
numbers = input_line.split(" ")

a = ""
b = ""

n = int(numbers[0])
m = int(numbers[1])

num = 0

while (num < m):
    a += numbers[0]
    num+=1

num=0
while (num < n):
    b += numbers[1]
    num+=1

result = a if int(a) > int(b) else b

print(result)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a>=b:
  tmp=a
  a=b
  b=tmp
print(a*((10**b-1)//9))

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

n = str(x)
m = str(y)

a = ""
b = ""

for i in range(x):
    b = b + m
for j in range(y):
    a = a + n
if(a<b):print(a)
else:print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = input().split()

print(min(x*int(y), y*int(x)))

Submission status: Accepted

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

Submission status: Accepted

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

contain=[str(a)*b,str(b)*a]

print(sorted(contain)[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    n,m = map(int,stdin.readline().split())
    ans = ""
    if n<m:
        x = str(n)
        for i in range(m):
            ans += x
    else:
        x = str(m)
        for i in range(n):
            ans += x
    print(ans)
main()

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    N,M  = map(int,stdin.readline().split())
    if(N < M):
        res = str(N)
        print(res*M)
    else:
        res = str(M)
        print(res*N)
        
main()

Submission status: Accepted

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

def func(x,y):  #xをy個
    s=0
    for i in range(y):
        s+=x*(10**i)
    return s

if a<=b:
    print(func(a,b))
else:
    print(func(b,a))

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:
n, m  = map(int, input().split())
a=n; b=m 
if(m<n): a=m; b=n;
for _ in range(b): print(a,end='');

Submission status: Accepted

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

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

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

for i in range(min(a,b)):
  if int(A[i])<int(B[i]):
    print(A)
    exit()
  elif int(B[i])<int(A[i]):
    print(B)
    exit()
    
print(A)

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 152 - B
# -*- encoding: UTF-8 -*-
a, b = map(int, input().split())

c = ""
l = ""

if a > b:
  c = b
  l = a
else:
  c = a
  l = b

st = ""
for i in range(l):
  st = st + str(c)

print(st)

Submission status: Accepted

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

a_b = []
b_a = []

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

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(str(min(N,M))*max(N,M))

Submission status: Accepted

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

Submission status: Accepted

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

print(str(a)*b if b >= a else 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())
s=[]
s.append(str(a)*b)
s.append(str(b)*a)
s.sort()
print(s[0])

Submission status: Accepted

Solution code:
# abc152
s = list(input().split())
lists = [s[0]*int(s[1]),s[1]*int(s[0])]
lists.sort()
print(lists[0])

Submission status: Accepted

Solution code:
#標準入力
num_list = input().split(" ")
a = num_list[0]
b = num_list[1]

#メイン実行部
str_1 = a * int(b)
str_2 = b * int(a)

if int(a) > int(b):
    print(str_2)
elif int(a) < int(b):
    print(str_1)
else:
    print(str_1)

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().rstrip().split(' ')]
d = [str(a)*b,str(b)*a]
print(sorted(d)[0])

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

Submission status: Accepted

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

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

print(min(_a, _b))

Submission status: Accepted

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

Submission status: Accepted

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

bigA = a*int(b)
bigB = b*int(a)

if bigA < bigB:
    print(bigA)
elif bigA == bigB:
    print(bigA)
else:
    print(bigB)

Submission status: Accepted

Solution code:
N,M = input().split()

ans_1 = ''
ans_2 = ''
for n in range(int(N)):
  ans_1 += M

for m in range(int(M)):
  ans_2 += N

if ans_1 > ans_2:
  ans = ans_2
else:
  ans = ans_1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def row(a, b):
    result = ''
    for _ in range(a):
        result += str(b)

    return result


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

if a > b:
    b_row = row(a, b)
    print(b_row)
else:
    a_row = row(b, a)
    print(a_row)

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())
def fn(n, m):
  k = 0
  for i in range (m):
    k = k + n * 10 ** i
  return k
if a > b:
  print(fn(b, a))
elif a < b:
  print(fn(a, b))
else:
  print(fn(a, b))

Submission status: Accepted

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

elem1 = ''.join([str(a)] * b)
elem2 = ''.join([str(b)] * a)
lst = sorted([elem1, elem2])
print(lst[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
s1 = "".join("%s" % a for _ in range(b))
s2 = "".join("%s" % b for _ in range(a))
print(min(s1, s2))

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input().split()
s1=a[0]*int(a[1])
s2=a[1]*int(a[0])
if s1<s2:
    print(s1)
else:
    print(s2)

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 = list(map(int, input().split()))
t = [min(a,b)] * max(a,b)

print("".join(map(str,t)))

Submission status: Accepted

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

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

Submission status: Accepted

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

_a = str(a) * b
_b = str(b) * a
ans = min(_a,_b)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

x=0
L=max(a,b)
S=min(a,b)

for i in range(L):
  x=10*x+S

print(x)

Submission status: Accepted

Solution code:
a,b = input().split()
aa=''.join([a for _ in range(int(b))])
bb=''.join([b for _ in range(int(a))])
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 = map(int,input().split())
if a < b:
    print(str(a)*b)
elif a > b:
    print(str(b)*a)
else:
    print(str(a)*b)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# B - Comparing Strings

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

v = min({a, b})
l = max({a, b})
print(str(v) * l)

Submission status: Accepted

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

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

def num(a,b):
    a = str(a) * b
    return a
    
aa = num(a,b)
bb = num(b,a)

def compare(a,b):
    if len(a) > len(b):
        return a
    else:
        return b

bigger = compare(aa,bb)

if aa == bb:
    print(aa)

for n in range(len(bigger)):
    if int(aa[n]) > int(bb[n]):
        print(bb)
        break
    elif int(aa[n]) < int(bb[n]):
        print(aa) 
        break 
    else:
        continue

Submission status: Accepted

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

Submission status: Accepted

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