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=input()
a,b=int(A.split()[0]),int(A.split()[1])
c,d="",""
for i in range(b):
  c+=str(a)
for i in range(a):
  d+=str(b)

if(int(c)<int(d)):
  nu=c
else:
  nu=d
for i in range(len(nu)):
  if(int(c[i])<int(d[i])):
    print(c)
    break
  elif(int(c[i])>int(d[i])):
    print(d)
    break
  elif(c==d):
    print(c)
    break

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
if x>= y:
    res = str(y)*x
else:
    res = str(x)*y
res = int(res)
print(res)

Submission status: Accepted

Solution code:
import sys
bbn=1000000007
	
#+++++

		
def main():
	b , c = map(int, input().split())
	if b > c:
		b,c=c,b
	ret=''.join([str(b)]*c)
	print(ret)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

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

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

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


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

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
a_l = list(str(a)*b)
b_l = list(str(b)*a)
c = 0
for i in range(0,min(len(a_l),len(b_l))):
    if c == len(a_l)-1:
        print(int(str(b)*a))
        break
    if a_l[i] == b_l[i]:
        c += 1
        continue
    if a_l[i] > b_l[i]:
        print(int(str(b)*a))
        break
    if a_l[i] < b_l[i]:
        print(int(str(a)*b))
        break

Submission status: Accepted

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

a = ""
b = ""

for i in range(l[0]):
    a += str(l[1])
for j in range(l[1]):
    b += str(l[0])
s = [a, b]
s = sorted(s)

print(s[0])

Submission status: Accepted

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

A=[]
B=[]
for i in range(a):
  B.append(str(b))

for j in range(b):
  A.append(str(a))
  
A_=str(''.join(A))
B_=str(''.join(B))

answer=(A_,B_)
answer=sorted(answer)


print(answer[0])

Submission status: Accepted

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

if str(N)*M>str(M)*N:
    print(str(M)*N)
else:
    print(str(N)*M)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print( min(A,B) )

Submission status: Accepted

Solution code:
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())
string=""
if a>b:
    for i in range(a):
        string = string + str(b)
elif b>a:
    for i in range(b):
        string = string + str(a)
else:
    for i in range(b):
        string = string + str(a)
print(string)

Submission status: Accepted

Solution code:
#-*- coding: utf-8
#  -*-
"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(a, b):
    if a > b:
        return int(str(b) * a)
    else:
        return int(str(a) * b)

    #if a + b + c <= 21: return 'win'
    #else: return 'bust'



do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    a, b = list(map(int, input().split()))
    # S = input().split()
    # a = int(input())
    # b = int(input())
    # T = input()
    print(sol(a, b))
    # S = input().strip()
    # print(sol(S))

Submission status: Accepted

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

Submission status: Accepted

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

ab = ''.join([a for _ in range(int(b))])
ba = ''.join([b for _ in range(int(a))])

print(min(ab,ba))

Submission status: Accepted

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

a_s = str(a)
b_s = str(b)

a_w=a_s
b_w=b_s

while b > 1:
    a_w+=a_s
    b -= 1

while a > 1:
    b_w+=b_s
    a -= 1

test_list = [a_w, b_w] 

res = min(filter(lambda s:isinstance(s, str), test_list)) 

print(res)

Submission status: Accepted

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

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

if ab == ba:
    print(ab)
if ab > ba:
    print(ba)
if ba > ab:
    print(ab)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
zz=str(a)*int(b)
yy=str(b)*int(a)
# print(zz)
# print(yy)
arr=[]
arr.append(zz)
arr.append(yy)
res = min(filter(lambda s:isinstance(s, str),arr))
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

A = [a for i in range(int(b))]
B = [b for i in range(int(a))]

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

Submission status: Accepted

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

print(max(A,B))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if s1 < s2:
    print(s1)
elif s1 > s2:
    print(s2)
elif s1 == s2:
    print(s1)

Submission status: Accepted

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

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

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

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())
a_str = ''
for _ in range(b):
    a_str += str(a)
b_str = ''
for _ in range(a):
    b_str += str(b)

dic = [a_str, b_str]
dic.sort()
print(dic[0])

Submission status: Accepted

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

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

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

#print(a_kake_b[0])
#print(b_kake_a[0])

if a_kake_b[0]>b_kake_a[0]:
  print(b_kake_a)
elif a_kake_b[0]<b_kake_a[0]:
  print(a_kake_b)
else:#文字列の頭が同じ場合
  if len(a_kake_b)>len(b_kake_a):
    print(b_kake_a)
  elif len(a_kake_b)<len(b_kake_a):
    print(a_kake_b)
  else:#文字列の頭が同じ数字で同じ長さの場合
    if int(a_kake_b)>int(b_kake_a):
      print(b_kake_a)
    else:
      print(a_kake_b)

Submission status: Accepted

Solution code:
a,b=input().split()
a_=int(a)
b_=int(b)
af=""
bf=""
for i in range(b_):
    af+=a
for i in range(a_):
    bf+=b
a=int(af)
b=int(bf)
print(max(a,b))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a >= b:
	for i in range(a):
		print(b, end='')
	print('\n')
else:
	for i in range(b):
		print(a, end='')
	print('\n')

Submission status: Accepted

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

a_text = a * int(b)
b_text = b * int(a)

if a_text < b_text:
    print(a_text)
else:
    print(b_text)

Submission status: Accepted

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

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

Submission status: Accepted

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

ta = tb = ""
for _ in range(b):
  ta+=str(a)
for _ in range(a):
  tb+=str(b)

t=[ta,tb]
t.sort()
print(t[0])

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
a,b=(int(x) for x in input().split())
i = 1

if  a == b:
    while (i<=a):
        print(a, end="")
        i += 1
elif a>b:
    while (i<=a):
        print(b, end="")
        i += 1
elif a<b:
    while (i<=b):
        print(a, end="")
        i += 1

print()

Submission status: Accepted

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

dict = {}
dict[a] = a * int(b)
dict[b] = b * int(a)

dict_sorted = sorted(dict.items(), key=lambda x:x[0])

print (dict_sorted[0][1])

Submission status: Accepted

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

Submission status: Accepted

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

if N <= M:
    ans = str(N) * M
else:
    ans = str(M) * N
print(ans)

Submission status: Accepted

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

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:
def main():
    a, b = input().split()
    astr = a * int(b)
    bstr = b * int(a)
    ans = sorted([astr, bstr])
    print(ans[0])

if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

L=[str(a)*b,str(b)*a]
L2=sorted(L)
print(L2[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(str, input().split())

ans_a = []
for i in range(int(b)):
  ans_a.append(a)

ans_b = []
for i in range(int(a)):
  ans_b.append(b)

if "".join(ans_a) > "".join(ans_b):
  print("".join(ans_b))
else:
  print("".join(ans_a))

Submission status: Accepted

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

s, l = [a, b] if a < b else [b, a]

print(str(s)*l)

Submission status: Accepted

Solution code:
arr=list(map(int,input().split()))
n=arr[0]
m=arr[1]
if m>n:
  for i in range(m):
    print(n,end='')
else:
  for i in range(n):
    print(m,end='')

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

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())
num = a if a <= b else b
loop = a if a > b else b
out = ""
for i in range(loop):
    out = out + str(num)
print(out)

Submission status: Accepted

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

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


print(max(int(ab),int(ba)))

Submission status: Accepted

Solution code:
a, b = raw_input().split()
Z = [a * int(b), b * int(a)]
print sorted(Z)[0]

Submission status: Accepted

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

l = str(a)*b
m = str(b)*a

if l < m:
    print(l)
else:
    print(m)

Submission status: Accepted

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

if (a == b):
    answer = [a] * a
elif (a > b):
    answer = [b] * a
else :
    answer = [a] * b

answer = list(map(str, answer))
answer = ''.join(answer)
print(answer)

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:
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 19 20:57:54 2020

@author: masat
"""

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

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

print("".join(answer))

Submission status: Accepted

Solution code:
# ab = list(map(input().split())).sort()
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)
else:
    print(B)

Submission status: Accepted

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

c = ""

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

print(c)

Submission status: Accepted

Solution code:
def join_str(num, loop_num):
  s = ''
  for i in range(loop_num):
    s = s + str(num)
  return s

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

i = 0
a_str = ""
while i < int(b):
    a_str += a
    i += 1

i = 0
b_str = ""
while i < int(a):
    b_str += b
    i +=1

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

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


a, b = read_ints()

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

print(str(a) * b)

Submission status: Accepted

Solution code:
import unittest


class TestB(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(4, 3), '3333')

    def test_2(self):
        self.assertEqual(think(7, 7), '7777777')


def solve():
    a, b = read()
    result = think(a, b)
    write(result)


def read():
    return read_int(2)


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b):
    s_a, s_b = str(a), str(b)
    canditate_a = str(a) * b
    canditate_b = str(b) * a
    return min(canditate_a, canditate_b)


def write(result):
    print(result)


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Accepted

Solution code:
import sys
a,b = input().split()
int_a,int_b = int(a),int(b)
moji_a = a
moji_b = b
for _ in range(int_b - 1) :
    moji_a += a

for _ in range(int_a - 1) :
    moji_b += b

for i in range(min(len(moji_a),len(moji_b))) :
    if int(moji_a[i]) < int(moji_b[i]) :
        print(moji_a)
        sys.exit()
    elif int(moji_a[i]) > int(moji_b[i]):
        print(moji_b)
        sys.exit()

if len(moji_a) < len(moji_b) :
    print(moji_a)
else :
    print(moji_b)

Submission status: Accepted

Solution code:
#!python3

iim = lambda: map(int, input().rstrip().split())

def resolve():
    a, b = iim()

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

out_1 = int(a*int(b))
out_2 = int(b*int(a))

print(max(out_1, out_2))

Submission status: Accepted

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

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

if a <= b:
  print(aa)
else:
  print(bb)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


if __name__ == "__main__":
    a, b = map(int,input().split())
    A = str(a) * b
    B = str(b) * a
    lis = [A, B]
    lis.sort()
    print(lis[0])

Submission status: Accepted

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

ans = []
if a >= b:
    ans = [b] * a
else:
    ans = [a] * b
    
for x in ans:
    print(x,end="")

Submission status: Accepted

Solution code:
import math
import sys

(N, M) = list(map(int,input().split()))

if N >  M:
    s = N
    N = M
    M = s 

print(''.join([str(N) for _ in range(M)]))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
S=max(a,b)
T=min(a,b)
B=str(T)
for i in range(S-1):
  B=B+str(T)
print(B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
a, b = input().split()
a_b = a * int(b)
b_a = b * int(a)
if int(a) <= int(b):
  print(a_b)
else:
  print(b_a)

Submission status: Accepted

Solution code:
def func():
    return

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

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

print(ans)

Submission status: Accepted

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

S = [a * int(b), b * int(a)]
S.sort()

print(S[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m = map(int,input().split())
a = b = ''
for _ in range(m):
    a += str(n)
for _ in range(n):
    b += str(m)

print(a if n <= m else b)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a= str(x)*y
b= str(y)*x

print(a if a<b else b)

Submission status: Accepted

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

Submission status: Accepted

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

min_value = min(a, b)

max_value = max(a, b)

min_value_list = []
for i in range(max_value):
    min_value_list.append(str(min_value))

print("".join(min_value_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input().split())

a=int(s[0])
b=int(s[1])
a_b=''
b_a=''

for i in range(b):#文字aをb回記載
 a_b+=s[0]


for i in range(a):#文字bをa回記載
 b_a+=s[1]

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

Submission status: Accepted

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

a_hairetu = ''
b_hairetu = ''

for i in range(a):
  b_hairetu = b_hairetu + str(b)
b_sin = int(b_hairetu)
  
for i in range(b):
  a_hairetu = a_hairetu + str(a)
a_sin = int(a_hairetu)

if a>=b:
  print(b_sin)
else:
  print(a_sin)

Submission status: Accepted

Solution code:
# a and b are +N 
a,b=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:
INPUT = list(map(int,input().split()))
a = INPUT[0]
b = INPUT[1]

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

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

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

Submission status: Accepted

Solution code:
#B - Comparing Strings
a,b = list(map(int, input().split()))
A=[]
B=[]
for row in range(b):
    A.append(a)
for row in range(a):
    B.append(b)

A=''.join(map(str,A))
B=''.join(map(str,B))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print ans

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
c = str(a)
d = str(b)
e = c
f = d
g = ''
h = ''
for i in range(b):
  g += e
for j in range(a):
  h += f
dic = [g,h]
dic.sort()
print(dic[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

if a>=b:
  less = b
  big = a
else:
  less = a
  big = b

st = str(less)
out=""
for i in range(big):
  out += st
print(out)

Submission status: Accepted

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

else:
    print(ans_2)

Submission status: Accepted

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

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

array = []
array.append(N*int(M))
array.append(M*int(N))

ans = sorted(array)

print(ans[0])

Submission status: Accepted

Solution code:
a,b=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:
a,b = input().split()
a = int(a)
b = int(b)
astr = ""
bstr = ""
for i in range(0,a):
	astr += str(b)

for i in range(0,b):
	bstr += str(a)

if ord(astr[:1]) > ord(bstr[:1]):
	print(bstr)
elif ord(astr[:1]) < ord(bstr[:1]):
	print(astr)
else:
	print(astr)

Submission status: Accepted

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

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

x = str(x)
y = 0
for j in range(0,a):
    y+=b*(10**j)
y = str(y)
if x>=y:
    print(y)

else:
    print(x)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
ab = [str(a) * b, str(b) * a]
ab.sort()
print(int(ab[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 = str(a)
B = str(b)
for i in range(1, b):
    A += str(a)
for i in range(1, a):
    B += str(b)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def p(a, b):
  for _ in range(b):
    print(str(a), end='')
  print('')

a, b = map(int, input().split())
if a == b:
  p(a,b)
elif a < b:
  p(a, b)
else:
  p(b, a)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b = map(str, input().split())
 
lis = []
res_a = a
res_b = b
 
for i in range(int(b)-1):
  res_a += a
lis.append(res_a)
 
for i in range(int(a)-1):
  res_b += b
lis.append(res_b)
 
print(int(sorted(lis)[0]))

Submission status: Accepted

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

for i in range(a-1):
    b_ += str(b)
for i in range(b-1):
    a_ += str(a)
anc = []
anc.append(b_)
anc.append(a_)

print(sorted(anc)[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
from fractions import gcd
from string import ascii_uppercase as ABC
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

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

Submission status: Accepted

Solution code:

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

if a > b :
    bb = b
    print (str(b) * a) #bをa回
else:
    print (str(a) *b)

Submission status: Accepted

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

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

print(max(int(tmp1), int(tmp2)))

Submission status: Accepted

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

Submission status: Accepted

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

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

if c[0] < d[0]:
    print(c)
else:
    print(d)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

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

char = min(a, b)
rep = max(a,b)

print(str(char) * rep)

Submission status: Accepted

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

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

if s1 < s2:
    print(s1)
else:
    print(s2)

Submission status: Accepted

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

Submission status: Accepted

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

aa = a
bb = b

for i in range(bb-1):
  a = str(a) + str(aa)

for j in range(aa-1):
  b = str(b) + str(bb)

print(max(int(a),int(b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calculate(a,b):
    s1 = list([str(a)]*b)
    s1 = "".join(s1)

    s2 = list([str(b)]*a)
    s2 = "".join(s2)

    arr = [s1,s2]

    arr = sorted(arr)

    print(arr[0])

S = input().split(" ")
a = int(S[0])
b = int(S[1])

calculate(a,b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
t = min(a, b)
x = max(a, b)
print(("%d"%t)*x)

Submission status: Accepted

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