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=input().split()
aa =[a*int(b),b*int(a)]
aa.sort()
print(aa[0])

Submission status: Accepted

Solution code:
# -*- encoding: utf-8 -*-
import sys
import re
import random
import numpy as np
from math import sqrt,log
from fractions import gcd  # python<=3.4
from collections import Counter, defaultdict

# st = Counter(raw_input())


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

print(ab)

Submission status: Accepted

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

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

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


if lb > la:
  print(la)
else:
  print(lb)

Submission status: Accepted

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

Submission status: Accepted

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

sa = ''.join([str(a) for _ in range(b)])
sb = ''.join([str(b) for _ in range(a)])

ss = sorted([sa, sb])
print(ss[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A = ""
B = ""

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

print(min(A,B))

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

str1 = a * int(b)
str2 = b * int(a)

if str1 > str2:
    print(str2)
else:
    print(str1)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if B < A:
    A,B = B,A

print(str(A)*B)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(min(c,d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 152 B
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
snm = lambda: map(str, input().split())
nl = lambda: list(map(int, input().split()))
a,b=nm()
s=''
t=''
for i in range(b):
    s+=str(a)

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

l=[]
l.append(s)
l.append(t)
l.sort()
print(l[0])

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=sorted(input().split())
print(x[0]*int(x[1]))

Submission status: Accepted

Solution code:
n, m = (int(_) for _ in input().split())

print(str(min(m,n))*max(m,n))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c=[str(min(a,b))]*max(a,b)
print(''.join(c))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque
input = sys.stdin.readline
a, b = map(int,input().split())
abc = []
abc.append(str(a)*b)
abc.append(str(b)*a)
abc.sort()
print(abc[0])

Submission status: Accepted

Solution code:
import sys


def solve(inp):
    (a, b) = inp.readline().strip().split(' ')

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

    return str(min(ab, ba))


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if a < b:
    print("".join([str(a)]*b))
else:
    print("".join([str(b)] * a))

Submission status: Accepted

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

ab_list=[str(a)]*b
ba_list=[str(b)]*a

ab_str="".join(ab_list)
ba_str="".join(ba_list)

if ab_str<=ba_str:
  print(ab_str)
else:
  print(ba_str)

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 = [int(x) for x in input().split()]

small = min(a, b)
big = max(a, b)
ans = str(small) * big
print(ans)

Submission status: Accepted

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

s = str(a)*b
t = str(b)*a

print(min(s, t))

Submission status: Accepted

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

res_a = a * int(b)
res_b = b * int(a)

if res_a > res_b:
    print(res_b)
else:
    print(res_a)

Submission status: Accepted

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


mx=max(a,b)
mn=min(a,b)

for i in range(mx):
    print(mn,end="")
print("")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)


def resolve():
    # S = [x for x in sys.stdin.readline().split()][0]  # 文字列 一つ
    # N = [int(x) for x in sys.stdin.readline().split()][0]  # int 一つ
    a, b = [int(x) for x in sys.stdin.readline().split()]  # 複数int
    # grid = [list(sys.stdin.readline().split()[0]) for _ in range(N)]  # 文字列grid
    # grid = [[int(x) for x in sys.stdin.readline().split()]
    #         for _ in range(N)]  # int grid

    logger.debug('{}'.format([]))

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


if __name__ == "__main__":
    resolve()

# AtCoder Unit Test で自動生成できる, 最後のunittest.main は消す
# python -m unittest template/template.py で実行できる
# pypy3 -m unittest template/template.py で実行できる

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """4 3"""
        output = """3333"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """7 7"""
        output = """7777777"""
        self.assertIO(input, output)

Submission status: Accepted

Solution code:
a,b=map(str, input().split())
aa=""
bb=""
for _ in range(int(a)):
    bb+=b
for _ in range(int(b)):
    aa+=a

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

Submission status: Accepted

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

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

print(out)

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

for i in range(b):
  S1+=str(a)
for j in range(a):
  S2+=str(b)
  
S3=[S1,S2]
S3.sort()
print(S3[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
print(min(A,B))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
num_min = str(min(a,b))
num_max = int(max(a,b))
ans = [num_min]*num_max
print("".join(map(str,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:
def solve(a, b):
    m = min(a, b)
    n = max(a, b)
    return "".join([str(m)] * n)


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


def test():
    assert solve(4, 3) == "3333"
    assert solve(7, 7) == "7777777"


if __name__ == "__main__":
    test()
    main()

Submission status: Accepted

Solution code:
A, B = input().split()
a = A[0]
b = B[0]

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

Submission status: Accepted

Solution code:
t = list(input().split())
t.sort()
ans = ''
for i in range(int(t[1])):
    ans += t[0]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# /usr/bin/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt
from fractions import gcd

def lcm(a, b):
    return (a*b) // gcd(a,b)

def intinput():
    return int(input())

def mulinputs():
    return map(int,input().split())

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas



A, B = mulinputs()

# 出力
n = min(A, B)
m = max(A, B)

print(str(n)*m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(r[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputs = input().split(" ")
a = int(inputs[0])
b = int(inputs[1])
print(str(a)*b if a <= b else str(b)*a)

Submission status: Accepted

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

Submission status: Accepted

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

c,d = "".join([a]*int(b)),"".join([b]*int(a))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''
'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''
'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''
'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''
'''
.append(要素)
.extend(要素)
.insert(場所,要素)
del 配列名[場所]
-1で末尾で末尾から一つ前
'''
'''
間に空白追加
' '.join(lis)
'''
'''
copy.copy(配列名)
'''
'''
sort()
sorted(reverse=true)
'''
'''
2分探索
bisect.bisect_left(リスト, 要素)
'''
'''
リスト同士の演算
list(map(lambda x, y: x+y, el2, el3))
'''
'''
配列の初期化
配列名=[a]*n+[b]*m
'''
'''
重複
list(set())
２次元配列
list(map(list, set(map(tuple, addition))))
'''
'''
順列
for el in itertools.permutations(配列のパターン):
'''
'''
Decimal()
'''
# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()




from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
import itertools
from functools import reduce
from operator import mul
def gcd(*numbers):
    return reduce(math.gcd, numbers)


def gcd_list(numbers):
    return reduce(math.gcd, numbers)


def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)


def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def get_unique_list(seq):
    seen = []
    return [x for x in seq if x not in seen and not seen.append(x)]


d = stdin.readline().rstrip().split()
a = d[0]
b = d[1]
ad = a * int(b)
bd = b * int(a)
data = [ad, bd]
data.sort()
print(data[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# File              : B.py
# Author            : JCHRYS <jchrys@me.com>
# Date              : 19.01.2020
# Last Modified Date: 19.01.2020
# Last Modified By  : JCHRYS <jchrys@me.com>

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

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

Submission status: Accepted

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

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


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


print(ans)

Submission status: Accepted

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

for i in range(y):
  print(list_ans[i], end ="")

Submission status: Accepted

Solution code:
def solve():
    a, b = map(str, input().split())
    A = ''.join([a for _ in range(int(b))])
    B = ''.join([b for _ in range(int(a))])
    tmp = sorted([A, B])
    print(tmp[0])


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())
A = str(a) * b
B = str(b) * a
print(min(A, B))

Submission status: Accepted

Solution code:


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

x = str(a)*b
y = str(b)*a
arr = [x,y]
arr.sort()
print(arr[0])

Submission status: Accepted

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

ac = ""
bc = ""

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

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

ans = [ac,bc]

ans.sort()

print(ans[0])

Submission status: Accepted

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

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

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


main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

    if a > b:
        print(str(b) * a)
    else:
        print(str(a) * b)
  
if __name__ == '__main__':
    main()

Submission status: Accepted

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

aList = [N*int(M),M*int(N)]

aList.sort()

print(aList[0])

Submission status: Accepted

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

ai = int(a)
bi = int(b)

sa = a * bi
sb = b * ai

# print(sa)
# print(sb)

print(sa if sa < sb else sb)

Submission status: Accepted

Solution code:

a, b = input().split()

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

if int(a) <= int(b):
    print(x)
else:
    print(y)

Submission status: Accepted

Solution code:
s = input().split()
x, y = int(s[0]), int(s[1])
A = ''.join([str(x)] * y)
B = ''.join([str(y)] * x)
print(min(A, B))

Submission status: Accepted

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

if N < K:
	for i in range(K):
		print(N, end = "")
elif N > K:
	for i in range(N):
		print(K, end = "")
else:
	for i in range(min(N, K)):
		print(N, end = "")

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc149/tasks/abc149_a

# 文字列に分割するならSTR使うだけでOK
a,b = map(int, input().split())

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

Submission status: Accepted

Solution code:
A=list(input().split())
#print(A)
a=A[0]*int(A[1])
b=A[1]*int(A[0])
L=[a,b]
L.sort()
print(L[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

    if a <= b:
        print(s)
    else:
        print(s2)
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a,b=map(int,input().split())
    x=sorted([str(a)*b,str(b)*a])
    print(x[0])
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

small = min(a,b)
big = max(a,b)

ans = [str(small)]*big

print(*ans, sep='')

Submission status: Accepted

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

if A == B:
  print(str(A)*B)
  exit()
  
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=input().split()
x, y = int(a), int(b)
print(min(a * y, b * x))

Submission status: Accepted

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

ans = 0
if c == d:
    for i in range(c):
        ans*=10
        ans += c
else:
    for i in range(d):
        ans*=10
        ans+= c
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s = ""
z = ""

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

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:
n = input()    
m = n.split()
p = [int(i) for i in m]
if p[0] > p[1]:
    print(str(p[1])*p[0])
else:
    print(str(p[0])*p[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def read():
    a, b = list(map(int, input().strip().split()))
    return a, b

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


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))

Submission status: Accepted

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

list_A = []

list_A.append(a*int(b))
list_A.append(b*int(a))

list_A.sort()

print(list_A[0])

Submission status: Accepted

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

Submission status: Accepted

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

P, Q = str(a) * b, str(b) * a
print(min(P, Q))

Submission status: Accepted

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

Submission status: Accepted

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

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 = input().split()
a2 = a * int(b)
b2 = b * int(a)
lis = [a2, b2]
lis.sort()
print(lis[0])

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b=map(int,input().split())
cnt=''
if a>b:
    for i in range(a):
        cnt+=str(b)
    print(cnt)
elif a<b:
    for i in range(b):
        cnt+=str(a)
    print(cnt)
else:
    for i in range(a):
        cnt+=str(a)
    print(cnt)

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:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

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

ab="".join([str(a)]*b)
ba="".join([str(b)]*a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Min = min(a,b)
Max = max(a,b)

for i in range(Max):
    print(str(Min),end="")

Submission status: Accepted

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

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

print(str(a)*b)

Submission status: Accepted

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

l = min(a, b)
x = max(a, b)
ans = str(l)*x
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

num1 = int(a[0] * int(a[1]))
num2 = int(a[1] * int(a[0]))

if int(a[1]) >= int(a[0]):
  print(num1)
else:
  print(num2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
print(max([int(str(H)*W),int(str(W)*H)]))

Submission status: Accepted

Solution code:
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
def gcd(a,b):return fractions.gcd(a,b) #最大公約数
def lcm(a,b):return (a*b) // fractions.gcd(a,b) #最小公倍数
def iin(): return int(input()) #整数読み込み
def isn(): return input().split() #文字列読み込み
def imn(): return map(int, input().split()) #整数map取得
def iln(): return list(map(int, input().split())) #整数リスト取得
def iln_s(): return sorted(iln()) # 昇順の整数リスト取得
def iln_r(): return sorted(iln(), reverse=True) # 降順の整数リスト取得
def join(l, s=''): return s.join(l) #リストを文字列に変換
def perm(l, n): return itertools.permutations(l, n) # 順列取得
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) # 順列の総数
def comb(l, n): return itertools.combinations(l, n) # 組み合わせ取得
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) #組み合わせの総数
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 # 2点間の距離

a, b = imn()

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

ans = sorted([ta, tb])

print(ans[0])

Submission status: Accepted

Solution code:
#B
a, b = map(int, input().split())
moji_a = str(a) * b
moji_b = str(b) * a
list = [moji_a, moji_b]
list.sort()

print(list[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
a,b = [(x) for x in stdin.readline().rstrip().split()]
ans1 = a*int(b)
ans2 = b*int(a)
print(sorted([ans1,ans2])[0])

Submission status: Accepted

Solution code:
import numpy as np

a, b = map(int, input().split())
#N = int(input())
#S = input()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)
INF = 10**30

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

buf_1 = str(a) * b
buf_2 = str(b) * a

if buf_1 > buf_2 :
    print(buf_2)
else :
    print(buf_1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

first=a*int(b)
second=b*int(a)

print(min(first,second))

Submission status: Accepted

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


A, B = '', ''
for i in range(int(b)):
    A += a
for j in range(int(a)):
    B += b
C = [A, B]
C.sort()
print(C[0])

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A, B = input().split()

    print(min(A * int(B), B * int(A)))


main()