Problem:


Score : 200 points

Problem Statement

Given are 1-digit positive integers a and b. Consider these two strings: the concatenation of b copies of the digit a, and the concatenation of a copies of the digit b. Which of these is lexicographically smaller?

Constraints

1 \leq a \leq 9

1 \leq b \leq 9

a and b are integers.

Input

Input is given from Standard Input in the following format:

a b

Output

Print the lexicographically smaller of the two strings. (If the two strings are equal, print one of them.)

Sample Input 1

4 3

Sample Output 1

3333

We have two strings 444 and 3333. Between them, 3333 is the lexicographically smaller.

Sample Input 2

7 7

Sample Output 2

7777777



Sample input:
4 3


Sample output:
3333

Submission status: Accepted

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

Submission status: Accepted

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

a = int(x[0])
b = int(x[1])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = list(map(int,input().split()))
i = 0
if a > b:
  while i < a:
    print(b, end="")
    i = i + 1
else:
  while i < b:
    print(a, end="")
    i = i + 1

Submission status: Accepted

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

Submission status: Accepted

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

a1 = str(a)*b
b1 = str(b)*a

arr = [a1,b1]
arr.sort()
print(arr[0])

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

tmp_list = []

str_1 = n * int(m)
str_2 = m * int(n)

tmp_list.append(str_1)
tmp_list.append(str_2)
print(sorted(tmp_list)[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

lst = list()
la = ""
lb = ""

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

lst.append(la)
lst.append(lb)
lst.sort()

print(lst[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

A = ''.join(A)
B = ''.join(B)
list_ = sorted([A, B])
print(list_[0])

Submission status: Accepted

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

print(sorted(ans_l)[0])

Submission status: Accepted

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

c = min(a, b)
d = max(a, b)
print(str(c) * d)

Submission status: Accepted

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

a = n*int(m)
b = m*int(n)
if a >= b:
  print(b)
else:
  print(a)

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = ["", ""]
for i in range(a):
    ans[0] += str(b)
for i in range(b):
    ans[1] += str(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline

a,b = list(map(int,input().split()))
a_s ,b_s = list(map(str,[a,b]))

ret_list = [a_s * b,b_s * a]
ret_list.sort()
print(ret_list[0])

Submission status: Accepted

Solution code:
a,  = [list(map(int, s.split())) for s in open(0)]

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

s = ""
for i in range(ma):
    s += str(mi)
print(s)

Submission status: Accepted

Solution code:
import sys

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


#mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
#import numpy as np


def main():
	a,b=map(int,input().split())
	c=min(a,b)
	d=max(a,b)
	ans=str(c)*d
	print(ans)


if __name__ == "__main__":
	main()

Submission status: Accepted

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

mini=min(A,B)
deca=max(A,B)
answer=""

for i in range(deca):
    answer+=str(mini)

print(answer)

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
v=[str(min(a,b)) for i in range(max(a,b))]

print(''.join(v))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 152: B (2020/01/19)
a, b = map(str, input().split())
x = ''
for i in range(int(b)):
    x = x + a
y = ''
for i in range(int(a)):
    y = y + b
if x < y:
    print(x)
else:
    print(y)

Submission status: Accepted

Solution code:
a = raw_input().split(" ")
 
l1 = a[0]*int(a[1])
l2 = a[1]*int(a[0])

if l1 < l2:
  print(l1)
else:
  print(l2)

Submission status: Accepted

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

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

if c < d:
    print(c)

else:
    print(d)

Submission status: Accepted

Solution code:
# coding: utf-8
def main():
    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)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
ans = 0
if a >= b:
  for i in range(a):
    ans = ans*10+b
else:
  for i in range(b):
    ans = ans*10 +a
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 = input().split()
r_a = ""
r_b = ""
for _ in range(int(b)):
    r_a = r_a + a
for _ in range(int(a)):
    r_b = r_b + b
print(min(r_a,r_b))

Submission status: Accepted

Solution code:
import sys


def main():
    tmp = input().split(" ")
    n = int(tmp[0])
    m = int(tmp[1])
    tmp = ""
    if n > m:
        for i in range(n):
            tmp += str(m)
    else:
        for i in range(m):
            tmp += str(n)
    print(tmp)


if __name__ == '__main__':
    input = sys.stdin.readline
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
sa = str(a)
sb = str(b)
sc = sa * b
sd = sb * a

if sc < sd:
    print(sc)
else:
    print(sd)

Submission status: Accepted

Solution code:
def solve(A, B):
  a_int = int(int(B) * A)
  b_int = int(B * int(A))

  print(max(a_int, b_int))

  
A, B = input().split()
solve(A, B)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if int(a)>=int(b):
    print(ba)
else:
    print(ab)

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_ans = int(str(a)*b)
b_ans = int(str(b)*a)

if a_ans >= b_ans:
    print(a_ans)
else:
    print(b_ans)

Submission status: Accepted

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


print(str)

Submission status: Accepted

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

Submission status: Accepted

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

if a<b:
  print(''.join([a]*int(b)))
else:
  print(''.join([b]*int(a)))

Submission status: Accepted

Solution code:

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

asum = 0
bsum = 0

for kk in range(b):
    asum = asum * 10 + a

for ll in range(a):
    bsum = bsum * 10 + b

if asum > bsum:
    print(asum)
else:
    print(bsum)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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())
c = str(a)*b
d = str(b)*a
arr =[c,d]
print(sorted(arr)[0])

Submission status: Accepted

Solution code:


b,c=map(int,input().split())
bc=c
cb=b
for i in range(b-1):
    bc=(bc*10+c)
for i in range(c-1):
    cb=(cb*10+b)
print(max(bc,cb))

Submission status: Accepted

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

ans1 = a
ans2 = b
if a >= b:
  ans1 = b
  ans2 = a

temp = ''
for i in range(ans2):
  temp += str(ans1)
print(temp)

Submission status: Accepted

Solution code:
A = list(input().split())
a_list = []
a = ''
for i in range(int(A[0])):
    a += A[1]
a_list.append(a)
b = ''
for i in range(int(A[1])):
    b += A[0]
a_list.append(b)
a_list.sort(reverse=False)
print(a_list[0])

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
# coding: utf-8
# Your code here!
def pin(type=int):
    return map(type,input().split())
"""    
入力は以下の形式で標準入力から与えられる。

N  #これいるかなぁ
x1　y1 N=0として。
xN　yN
"""
a,b= pin(str)
StrA = a*int(b)
StrB = b*int(a)
if StrA >= StrB:
    print(StrB)
else:
    print(StrA)

Submission status: Accepted

Solution code:

def main():
    a, b = [int(x) for x in input().split()]
    if a > b:
        small = str(b)
        big = a
    else:
        small = str(a)
        big = b
    for _ in range(big):
        print(small, end='')
    print()


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    a, b = MAP()
    A = str(a)*b
    B = str(b)*a
    li = [A, B]
    li.sort()
    print(li[0])


if __name__=='__main__':
    main()

Submission status: Accepted

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

if str_1 > str_2:
  print(str_2)
else:
  print(str_1)

Submission status: Accepted

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

a_str = a * int(b)
b_str = b * int(a)

if int(a) < int(b):
  print(a_str)
else:
  print(b_str)

Submission status: Accepted

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

Submission status: Accepted

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

a_4 = int(str(a)*b)

b_4 = int(str(b)*a)

if (a_4 > b_4):
    print(a_4)
else:
    print(b_4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()
x = [0]*2
x[0] = a*int(b)
x[1] = b*int(a)
x.sort()
print(x[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:
def main():
    a, b = map(int, input().split())
    string = ['', '']

    string[0] = str(a) * b
    string[1] = str(b) * a

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

n1 = int(str(a)*b)
n2 = int(str(b)*a)

if a >= b:
  print(n2)
else:
  print(n1)

Submission status: Accepted

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

aa = str(a) * b
bb = str(b) * a
print(aa if aa < bb else bb)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a, b = map(int,input().split()) # 複数の数字を変数に格納

char = ''
num = 0
result = ''

if a > b:
    char = str(b)
    num = a
else:
    char = str(a)
    num = b

for i in range(num):
    result = result + char
    
print(result)

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:

N,M = input().split()
nN,mM = int(N), int(M)

NN = ''
MM = ''
for i in range(mM):
    NN += N
    
for i in range(nN):
    MM += M

x = [MM,NN]
x.sort()
print(x[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# B - Comparing Strings
a,b = map(str,input().split())
ans_1 = a *int(b)
ans_2 = b *int(a)
#print(ans_1,ans_2)
if a >= b:
    print(ans_2)
else:
    print(ans_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:
# -*- coding: utf-8 -*-

### TESTCASE
test = ""
#test = \
"""
4 3
ans
3333
"""

"""
9 3
ans
333333333
"""
############
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
####### MAIN

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

print(sorted([str(a) * b, str(b) * a])[0])

Submission status: Accepted

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

a_ = "".join([a for _ in range(int(b))])
b_ = "".join([b for _ in range(int(a))])
print(sorted([a_, b_])[0])

Submission status: Accepted

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

if (n > m):
    for i in range(n):
        text += str(m)
elif (m > n):
    for i in range(m):
        text += str(n)
elif (n == m):
    for i in range(n):
        text += str(m)

print(text)

Submission status: Accepted

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

Submission status: Accepted

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

first = ""
for i in range(int(b)):
    first += a
last = ""
for i in range(int(a)):
    last += b

lst = sorted([first, last])

print(lst[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(min(len(x), len(y))):
  if int(x[i]) > int(y[i]):
    print(y)
    exit()
  elif int(x[i]) < int(y[i]):
    print(x)
    exit()
  else:
    continue
else:
  print(x)

Submission status: Accepted

Solution code:
a_s, b_s = input().split()
a_i = int(a_s)
b_i = int(b_s)

a,b = "",""
for _ in range(a_i):
  b += b_s
for _ in range(b_i):
  a += a_s

ans = []
ans.append(a)
ans.append(b)

ans.sort()

print(ans[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

X=""
for i in range(int(b)):
    X+=a
Y=""
for i in range(int(a)):
    Y+=b


if X>Y:
    print(Y)
else:
    print(X)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
k = min(a, b)
kk = max(a, b)
lis = [k]*kk
print(*lis, sep="")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=input().split();
a=int(k[0])
b=int(k[1])
if(a>b):
 print(k[1]*a)
else:
 print(k[0]*b)

Submission status: Accepted

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

print(sorted([str(a) * b, str(b) * a])[0])

Submission status: Accepted

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

mx = max(a,b)
mn = min(a,b)
ans = ''
for i in range(mx):
  ans += str(mn)
print(ans)

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

aa = ''.join([a for _ in range(int(b))])
bb = ''.join([b for _ in range(int(a))])

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

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())
S = str(min(a, b))
S_list= "".join([S]*max(a, b))
print(S_list)

Submission status: Accepted

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

Submission status: Accepted

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


ab = ''.join((str(a) for x in range(b)))
ba = ''.join((str(b) for x in range(a)))

if str(ab) > str(ba):
  print(ba)
else:
  print(ab)

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split(" "))
    smaller = min(a, b)
    bigger = max(a, b)
    print(str(smaller) * bigger)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
A, B = [int(v) for v in input().split()]

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

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


if sAB > sBA:
    print(sBA)
else:
    print(sAB)

Submission status: Accepted

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

if (A < B):
    i = 0
    while True:
        i+=1
        print(A, end="")
        if (B == i):
            break

else:
    i = 0
    while True:
        i += 1
        print(B, end="")
        if (A == i):
            break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a_b = list(map(lambda x: int(x), input().split(" ")))
if a_b[0] >= a_b[1]:
    x = a_b[0]
    y = a_b[1]
else:
    x = a_b[1]
    y = a_b[0]

print(str(y)*x)

Submission status: Accepted

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

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

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:
import sys


def main():
    a_and_b = sys.stdin.readline().strip().split(' ')
    a = a_and_b[0]
    b = a_and_b[1]
    ai = int(a_and_b[0])
    bi = int(a_and_b[1])

    if a == b:
        print(a * bi)
        return

    if a > b:
        print(b * ai)
    else:
        print(a * bi)


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

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 = min(a,b)
d = max(a,b)
e = 0
for i in range(d):
  e += c*(10**i)
print(e)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

print(min(x,y))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import collections
#sys.setrecursionlimit(100000)

#n=int(input())
tmp = input().split()
a,b = list(map(lambda a: int(a), tmp))

s=""
if(a>=b):
	max=a
	min=b
else:
	max=b
	min=a

for i in range(max):
	s+=str(min)
print(s)

Submission status: Accepted

Solution code:
import math
from collections import deque

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

s1=int(s[0])*s[1]
s2=int(s[1])*s[0]


if int(s[0])>int(s[1]):
    print(s1)
else:
    print(s2)

Submission status: Accepted

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

for i in range(len(ans)):
    print(ans[i],end="")

Submission status: Accepted

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

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

Solution code:
A, B = input().split()
AA = A * int(B)
BB = B * int(A)

print(min(AA, BB))

Submission status: Accepted

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

s1 = "".join([str(a) for _ in range(b)])
s2 = "".join([str(b) for _ in range(a)])

print(s1 if s1 < s2 else s2)

Submission status: Accepted

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

kai = ''
if b > a:
  for i in range(b):
    kai += str(a)
else:
  for i in range(a):
    kai += str(b)

print(kai)

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

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sa = a * int(b)
sb = b * int(a)

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

def solve(a, b):
    a_str = str(a) * b
    b_str = str(b) * a
    print(a_str if a_str <= b_str else b_str)

if __name__ == '__main__':
    a, b = map(int, sys.stdin.readline().strip().split(" "))
    solve(a, b)

Submission status: Accepted

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

r = sorted([a*int(b), b*int(a)])
print(r[0])

Submission status: Accepted

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

print(str(b) * a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a, b= [int(x) for x in 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 = map(int,input().split())

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

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

Submission status: Accepted

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

int1 = ''
for i in range(a):
  int1 += str(b)
  
int2 = ''
for i in range(b):
  int2 += str(a)
  
print(max(int(int1),int(int2)))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(str(le) * gt)

Submission status: Accepted

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

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

Submission status: Accepted

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