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

Submission status: Accepted

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

if int(n) == int(m):
    print(str(n)*int(m))
elif int(n) > int(m):
    print(str(m)*int(n))
else:
    print(str(n)*int(m))

Submission status: Accepted

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

if a < b:
  s = str(a)
  loop = b
else:
  s = str(b)
  loop = a

for _ in range(loop):
  temp += s
print(temp)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
n = 0
if a >= b:
  while(a != 0):
    a += -1
    n += b * (10**a)
else:
  while(b != 0):
    b += -1
    n += a * (10**b)
print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
import math
import time
import numpy as np
import collections
from collections import deque
import queue
import copy

# 最大公約数
def gcd(m,n):
  x = max(m,n)
  y = min(m,n)
  if x%y == 0:
    return y
  else:
    while x%y != 0:
      z = x%y
      x = y
      y = z
    else:
      return z

# 幅優先探索(BFS)でスタート座標(x, y)からの最大距離返す
def bfs(SS, x, y, H, W):#入力(座標系(迷路), x, y, xの端, yの端)
  x_next = [0, 0, -1, 1]
  y_next = [1, -1, 0, 0]
  tempx = x
  tempy = y
  mlength = 0
  q = deque()
  xytuple = (x, y, 0)
  q.append(xytuple)


  while q:
    xytuple = q.popleft()
    SS[xytuple[0]][xytuple[1]] = "x" #探索した場所は探索できないようにする
    for i in range(4): #このforで上下左右を調べてる
      tempx = xytuple[0] + x_next[i]
      tempy = xytuple[1] + y_next[i]
      #print(tempx, tempy, xytuple[2])
      #print(S)
      if(0 <= tempx and tempx < H and 0 <= tempy and tempy < W and SS[tempx][tempy] == "."):
        temptuple = (tempx, tempy, xytuple[2]+1)
        SS[temptuple[0]][temptuple[1]] = "x" #探索した場所は探索できないようにする
        mlength = max(mlength, xytuple[2] +1)
        q.append(temptuple)
      #print(q)
  return mlength


#X = str(input()).split()
ab = str(input()).split()
a = int(ab[0])
b = int(ab[1])
A = ab[0]
B = ab[1]
C = ""
D = ""

# S = [[0 for i in range(W)] for j in range(H)]

for i in range(a):
  C += B

for i in range(b):
  D += A

if(A>B):
  print(C)
elif(A<B):
  print(D)
else:
  print(D)

Submission status: Accepted

Solution code:
a, b = input().split()
aa = []
bb = []
for i in range(int(b)):
    aa.append(a)
for i in range(int(a)):
    bb.append(b)
a = "".join(aa)
b = "".join(bb)

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

Submission status: Accepted

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

word_a = a * int(b)
word_b = b * int(a)

word_list = [word_a, word_b]
word_list.sort()
print(word_list[0])

Submission status: Accepted

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

astr = ''
bstr = ''

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

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

if astr > bstr:
    print(bstr)
elif astr < bstr:
    print(astr)
else:
    print(astr)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

print(min([ab,ba]))

Submission status: Accepted

Solution code:
a,b=input().split()
a_int=int(a)
b_int=int(b)
n1=int(a*b_int)
n2=int(b*a_int)
if a_int==b_int:
    print(n1)
if a_int<b_int:
    print(n1)
if a_int>b_int:
    print(n2)

Submission status: Accepted

Solution code:
# import itertools
# import math


def solve(A, B):
    AA = ''
    for b in range(B):
        AA += str(A)

    BB = ''
    for a in range(A):
        BB += str(B)
    ans = sorted([AA, BB])
    return ans[0]


# N = int(input())
# S = input()
A, B = map(int, input().split())
# A = list(map(int, input().split()))

# P = []
# S = []
# for i in range(N):
#     pp, ss  = map(int, input().split())
#     P.append(pp)
#     S.append(ss)

print(solve(A, B))

Submission status: Accepted

Solution code:

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

x = ''.join([str(a) for _ in range(0, b)])
y = ''.join([str(b) for _ in range(0, a)])

z = [x,y]
z.sort()
print(z[0])

Submission status: Accepted

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

print(str(n) * m)

Submission status: Accepted

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

Submission status: Accepted

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

a_s = str(a_s)
b_s = str(b_s)

print(min(a_s,b_s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b = input().split()
aaa = a * int(b)
bbb = b * int(a)
if aaa > bbb:
    print(bbb)
elif aaa < bbb:
    print(aaa)
elif aaa == bbb:
    print(aaa)

Submission status: Accepted

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

t = 0
s = 0
if a > b:
    t = b
    s = a
else:
    t = a
    s = b

r = ''
for i in range(s):
    r += str(t)
print(r)

Submission status: Accepted

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


def solve(a: int, b: int):
    c=[]
    d=[]
    for i in range(int(a)):
        c.append(b)
    for i in range(int(b)):
        d.append(a)
    ans="".join(min(c,d))
    print(ans)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

def create_str(n, count):
    return str(n) * count

if a == b:
    print(create_str(a, b))
elif a > b:
    print(create_str(b, a))
else:
    print(create_str(a, b))

Submission status: Accepted

Solution code:
N,M=map(int, input().split())
st=""
if (N<=M):
    for _ in range(M):
        st="".join((st,str(N)))
    print(st)
else:
    for _ in range(N):
        st="".join((st,str(M)))
    print(st)

Submission status: Accepted

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

Submission status: Accepted

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

a_res = ""
b_res = ""
for i in range(b):
    a_res += str(a)
for i in range(a):
    b_res += str(b)

ss = [a_res, b_res] 
ss = sorted(ss)

print(ss[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a1, b1 = map(int, input().split())
a2 = str(a1) * b1
b2 = str(b1) * a1
if int(a2[0]) > int(b2[0]):
    print(b2)
elif int(a2[0]) < int(b2[0]):
    print(a2)
else:
    print(a2)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
a, b = map(int, input().split())

x = ""
y = ""

for _ in range(b) :
  x += str(a)
for _ in range(a) :
  y += str(b)

if int(x) >= int(y) :
  print (int(x))
else :
  print (int(y))

Submission status: Accepted

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

for i in range(b):
  A.append(a)

for i in range(a):
  B.append(b)

if A <= B:
  print("".join(map(str, A)))

else:
  print("".join(map(str,B)))

Submission status: Accepted

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

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

Submission status: Accepted

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

s1 = ''
s2 = ''

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

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

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 = [int(x) for x in input().split()]
A = str(a)*b
B = str(b)*a
print(sorted([A, B])[0])

Submission status: Accepted

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

print("{0}".format(a) * b if a < b else "{0}".format(b) * a)

Submission status: Accepted

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

    atimesb = str(a) * b
    btimesa = str(b) * a

    if len(atimesb) > len(btimesa):
        print(atimesb)
    elif len(atimesb) < len(btimesa):
        print(btimesa)
    else:

        for i in range(min(len(atimesb), len(btimesa))):
            if int(atimesb[i]) != int(btimesa[i]):
                if atimesb[i] < btimesa[i]:
                    print(atimesb)
                else:
                    print(btimesa)
                break
        else:
            print(atimesb)

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b = map(int, readline().split())
#arr = [line.split() for line in readlines()]

mx = max(a, b)
mn = min(a, b)
print(str(mn) * mx)

Submission status: Accepted

Solution code:
import queue
import copy
import math
from collections import deque

# そのまま入力文字列の入力
a, b = map(int, input().split())

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

s = ""
for i in range(0, large):
    s += str(small)

print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for _ in range(int(a)):
    strb = strb + b
for _ in range(int(b)):
    stra = stra + a

if a < b:
    print(stra)
else:
    print(strb)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if a*10**(b-1)>b*10**(a-1):
    for i in range(b):
        print(a,end="")
    print('\n')
else:
    for i in range(a):
        print(b,end="")
    print('\n')

Submission status: Accepted

Solution code:
if __name__=="__main__":
    a, b = map(int, input().split())
    if a <= b:
        lis=[a]*b
    else:
        lis=[b]*a

    s=""
    for i in range(len(lis)):
        s = s + str(lis[i])

    print(s)

Submission status: Accepted

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

list_a = [ str(n) for i in range(m)]
list_b = [ str(m) for i in range(n)]


if n < m:
    print(''.join(list_a))
else:
    print(''.join(list_b))

Submission status: Accepted

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

Submission status: Accepted

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

a_ = ''
b_ = ''

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

for j in range(int(a)):
    b_ = b_ + b

if a_ < b_:
    print(a_)
else:
    print(b_)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = list(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:
H = list(map(int, input().split()))
N = H[0]
M = H[1]
ans=0
if N<M:
    for i in range(M):
        ans+=N*(10**i)
else:
    for i in range(N):
        ans+=M*(10**i)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a, b = [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:
# coding: utf-8
# Your code here!
a,b = map(int,input().split(" "))
p = str(a)
q = str(b)
for i in range(b-1):
    p += str(a)
    
for i in range(a-1):
    q += str(b)
    
res = [p,q]
res = sorted(res)
print(res[0])

Submission status: Accepted

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

if a <= b:
  ans = '%s' % a
  ans = ans * b
else:
  ans = '%s' % b
  ans = ans * a

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:
def bit_mani(num, quant):
    ans = 0
    for i in range(quant):
        ans *= 10
        ans += num
    return ans

n, m = input().split(" ")
if int(n) < int(m):
    print(bit_mani(int(n), int(m)))
    
else:
    print(bit_mani(int(m), int(n)))

Submission status: Accepted

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

a_srting = str(a) * b
b_string = str(b) * a


if a_srting < b_string:
    print(a_srting)
else:
    print(b_string)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
A = str(a)
B = str(b)
for i in range(a-1):
    B = B + str(b)
for j in range(b-1):
    A = A + str(a)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    n, m = LI()
    if n == m:
        print("Yes")
    else:
        print("No")

    return


# B
def B():
    a, b = LI()
    if a <= b:
        ans = str(a) * b
    else:
        ans = str(b) * a
    print(ans)
    return


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Solve
if __name__ == "__main__":
    B()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M = list(map(int, input().split()))
if N >= M:
  print(str(M) * N)
else:
  print(str(N) * M)

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
from collections import deque
import numpy as np
import heapq
from heapq import heappush, heappop


#read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

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


big = 0
small = 0

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

ans = [str(small)] * big
ans = ''.join(ans)

print(ans)

Submission status: Accepted

Solution code:
x = input().strip().split(' ')
if(x[0]<x[1]): print(x[0]*int(x[1]))
else: print(x[1]*int(x[0]))

Submission status: Accepted

Solution code:
import sys
a, b = map(int, sys.stdin.readline().split())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sa, sb = list(input().split(' '))
a, b = list(map(int, [sa, sb]))

if sa < sb:
    print(sa*b)
else:
    print(sb*a)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)

def main():
    a, b = map(int, input().split())
    logging.info("Hello!")

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

ab = 0
ba = 0

for i in range(a):
    ab += b * (10 ** i)

for j in range(b):
    ba += a * (10 ** j)

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

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())
n=''
if a>b:
    for i in range(a):
        n=n+str(b)
    print(int(n))
else:
    for i in range(b):
        n=n+str(a)
    print(int(n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    a, b = map(int, args[0].split())
    ans, _ = sorted([str(a)*b, str(b)*a]) 
    return ans


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

s1 = ''
for i in range(ab[1]):
  s1+= str(ab[0])

s2 = ''
for i in range(ab[0]):
  s2+= str(ab[1])

sa = sorted([s1, s2])

print(sa[0])

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

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

Submission status: Accepted

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

ans_1 = [a for _ in range(b)]
ans_1 = "".join(map(str, ans_1))
ans_2 = [b for _ in range(a)]
ans_2 = "".join(map(str, ans_2))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=input().split()
ans = ["",""]

for i in range(int(B)):
  ans[0] = ans[0] + A
for i in range(int(A)):
  ans[1] = ans[1] + B

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x=''
y=''

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

x=int(x)
y=int(y)

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

Submission status: Accepted

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

ab = ''
ba = ''

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

for j in range(a):
    ba = ba + str(b)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')

n,m = inpl()
a = ""
b = ""
for i in range(m):
    a += str(n)

for j in range(n):
    b += str(m)

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

Submission status: Accepted

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

aa=""
bb=""

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

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

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

Submission status: Accepted

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

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

print( str(a) * b )

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

ans = ""
for i in range(t):
  print(str(m), end="")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ast=str(a)
bst=str(b)
for i in range(b-1):
    ast+=str(a)
for i in range(a-1):
    bst+=str(b)
alis=sorted([ast,bst])
print(int(alis[0]))

Submission status: Accepted

Solution code:
from sys import stdin

a, b = [int(x) for x in stdin.readline().rstrip().split()]

ans = ""

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

moji_a = str(a)*b
moji_b = str(b)*a

if moji_a < moji_b:
    print(moji_a)

else:
    print(moji_b)

Submission status: Accepted

Solution code:

def main():
    a,b = map(int,input().split())
    a_c = ord(str(a))
    b_c = ord(str(b))
    a_s = str(a) * b
    b_s = str(b) * a
    if a_c < b_c:
        answer = a_s
    elif a_c > b_c:
        answer = b_s
    else:
        answer = a_s if len(a_s) <= len(b_s) else b_s
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
d = input().split(" ")
a = int(d[0])
b = int(d[1])
bc = d[0] * b
ac = d[1] * a
l = [ac, bc]
l.sort()
print(l[0])

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=map(int,input().split(" "))
ans = ""
if N<M:
    for i in range(M):
        ans += str(N)
    print(ans)
else:
    for i in range(N):
        ans += str(M)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

answer=0
for count in range(max(a,b)):
    answer*=10
    answer+=min(a,b)
print(answer)

Submission status: Accepted

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

a_value = str(a) * b
b_value = str(b) * a

x = sorted([a_value, b_value])[0]

print(x)

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

line_a = ""
line_b = ""
dict = []

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

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

dict.append(line_a)
dict.append(line_b)
dict.sort()

print(dict[0])

Submission status: Accepted

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

if A <= B:
  for i in range(B):
    Ans = Ans + str(A)

else:
  for j in range(A):
    Ans = Ans + str(B)

print(Ans)

Submission status: Accepted

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

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

    print(min(A, B))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

d = []
d = sorted(c)

print(int(d[0]))

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline())
def LI(): return [int(x) for x in sys.stdin.readline().split()]

def main():
    a,b = input().split()
    print(min(a,b)*int(max(a,b)))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

b_new = ""
a_new = ""

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    a,b=map(int,input().split())
    A=str(a);B=str(b)
    N=min(len(A),len(B))
    ans=None
    for i in range(N):
        if int(A[i])>int(B[i]):
            ans='B'
            break
        elif int(B[i])>int(A[i]):
            ans='A'
            break
    else:
        if len(A)==N:
            ans=A
            z=b
        else:
            ans=B
            z=a
    if ans=='A':
        print(str(a)*b)
    elif ans=='B':
        print(B*a)
    else:
        print(ans*z)
    

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

str1 = ""
str2 = ""

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

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

print(sorted([str1, str2])[0])

Submission status: Accepted

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

ansa=str(a)
ansb=str(b)

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

A=[]
A.append(ansa)
A.append(ansb)

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

Submission status: Accepted

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

a = str(N)*M
b = str(M)*N
l = [a,b]
print(sorted(l)[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=input().split()
A=[]
B=[]
for i in range(int(a)):
   B.append(b)
c="".join(B)

for i in range(int(b)):
   A.append(a)
d="".join(A)

E=[c,d]
E.sort()
print(E[0])

Submission status: Accepted

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

if a_b[0] <= b_a[0]:
    print(a_b)
else:
    print(b_a)

Submission status: Accepted

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

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

if int(A) > int(B):
    print(str(A))
else:
    print(str(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 = list(map(str,input().split()))
C = A * int(B)
D = B * int(A)
listA = [C,D]
listA.sort()
print(listA[0])