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:
#!/usr/bin/env python3
import sys


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


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    solve(a, b)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(d):
    e = e + c

print(e)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

one = str(a) * b
two = str(b) * a
lst = [one,two]
lst.sort()
print(lst[0])

Submission status: Accepted

Solution code:
a, b = input().split()
str_list = []
a_ = a * int(b)
b_ = b * int(a)
str_list.append(a_)
str_list.append(b_)
str_list = sorted(str_list)
print('%s' % str_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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

SA=[a]*b
SB=[b]*a

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

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())
s1=str(b)*a
ss1=int(s1)
s2=str(a)*b
ss2=int(s2)
if ss1>ss2:
    print(s1)
else:
    print(s2)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if a > b:
    b, a = a, b

print(str(a) * b)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

a, b = a*int(b), b*int(a)

print(min(a, b))

Submission status: Accepted

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

L_new = [None, None]
L_new[0] = L[0]*int(L[1])
L_new[1] = L[1]*int(L[0])

sorted_L = sorted(L_new)

print(sorted_L[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ia, ib = int(a), int(b)

s1 = a * ib
s2 = b * ia

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
x=10
tmpa=a
tmpb=b
for i in range(tmpb-1):
    a+=tmpa*x
    x*=10
x=10
for i in range(tmpa-1):
    b+=tmpb*x
    x*=10

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

Submission status: Accepted

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

Submission status: Accepted

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

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 accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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

a, b = MAP()

com1 = a//(10**(len(str(a))-1))
com2 = b//(10**(len(str(b))-1))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def repeat(n, m):
    if m==0:
        return ""
    else:
        return str(n)+repeat(n, m-1)

n, m = list(map(int, input().split()))
if n<m:
    print(repeat(n, m))
else:
    print(repeat(m, n))

Submission status: Accepted

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

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

print(sorted(list)[0])

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,S = [int(x) for x in input().split()]
a=max(N,S)
b=min(N,S)
c=0
for i in range(a): c+=b*10**i
print(c)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
ans1 = b*str(a)
ans2 = a*str(b)
li = [ans1,ans2]
li = sorted(li)
print(li[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:
a, b = map(int, input().split())
ans = [str(a)*b, a*str(b)]
ans.sort()
print(ans[0])

Submission status: Accepted

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


def solve(a: int, b: int):
    ab = str(a)*b
    ba = str(b)*a
    if ab > ba:
        print(ba)
    else:
        print(ab)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m = input().strip().split()
a = ""
if(n<m):
  for i in range(int(m)):
    a += n
else:
  for i in range(int(n)):
    a += m
print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=input().split()
c=int(a)
d=int(b)
e=(a*d)
f=(b*c)
g=e[0:1]
h=f[0:1]
if g<=h:
    print(e)
else:
    print(f)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
row = sys.stdin.readline
def read_strings(row):
    return list(map(str, row().split()))
  
a, b =read_strings(row)
print(min(a * int(b),b*int(a)))

Submission status: Accepted

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

a.sort()
for i in range(a[1]):
    ans.append(a[0])

print(int(''.join(map(str,ans))))

Submission status: Accepted

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

list = [str(a)*b, str(b)*a]
list = sorted(list)

print(list[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = [str(i) for i in input().rstrip().split(' ')];
_a = _b = ""
for i in range(int(B)): _a += A 
for a in range(int(A)): _b += B 
_str = [_a, _b]
_str.sort()
print(_str[0])

Submission status: Accepted

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

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()
print(max(int(a*int(b)), int(b*int(a))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import math

if __name__ == "__main__":
  _a, _b = map(str,input().split())
  a_int, b_int = int(_a), int(_b)

  a_b = _a*b_int
  b_a = _b*a_int
  if a_b <= b_a:
    print(a_b)
  else:
    print(b_a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

strA = str(a)*b
strB = str(b)*a

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

dif = a if a > b else b
ans = 0
for i in range(dif):
  ans += 10**i*(a+b-dif)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
# import numpy as np
# import sys
# sys.setrecursionlimit(10**4)

def _li(): return list(map(int, stdin.readline().split()))
def _li_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def _lf(): return list(map(float, stdin.readline().split()))
def _ls(): return stdin.readline().split()
def _i(): return int(stdin.readline())
def _f(): return float(stdin.readline())
def _s(): return stdin.readline()[:-1]


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

a = 0
b = 0

for i in range(0,ab[1]):
  a *= 10
  a += ab[0]

for i in range(0,ab[0]):
  b *= 10
  b += ab[1]

ab[0] = str(a)
ab[1] = str(b)

ab = sorted(ab)

print(ab[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

print(A)

Submission status: Accepted

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

a=y[0]
b=y[1]

char1=a*int(b)
char2=b*int(a)

if int(char1)>int(char2):
    print(char1)
else:
    print(char2)

Submission status: Accepted

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

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

print(bb if a>b else aa)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().split()
a = int(s[0])
b = int(s[1])
answer = ""
if(b<=a):
  for i in range(a):
    answer = answer + str(b)
else:
  for i in range(b):
    answer = answer + str(a)
print(answer)

Submission status: Accepted

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

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

print(aa if a < b else bb)

Submission status: Accepted

Solution code:
import numpy as np

x = list(map(int,input().split()))
if x[0] > x[1]:
    ans = np.repeat(x[1],x[0])
    for i in ans:
        print(i, end="")
    
elif x[0] < x[1]:
    ans = np.repeat(x[0],x[1])
    for i in ans:
        print(i, end="")
    
else:
    ans = np.repeat(x[0],x[1])
    for i in ans:
        print(i, end="")

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
S1,S2 = "",""
for i in range(A):
    S1 = S1 + str(B)
for i in range(B):
    S2 = S2 + str(A)
if(int(S1) > int(S2)):
    print(S1)
else:
    print(S2)

Submission status: Accepted

Solution code:

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))

INF = 1 << 29

DIV = (10**9) + 7

def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)

def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max,mod=DIV):
    fac,finv,inv = [0]*max, [0]*max, [0]*max
    fac[0]=fac[1]=1
    finv[0]=finv[1]=1
    inv[1]=1
    for i in range(2,max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod -inv[mod%i] * (mod//i)%mod
        finv[i] = finv[i-1]*inv[i]%mod
    class CONV:
        def __init__(self):
            pass
        def ncr(self,n,k):
            if(n<k):
                return 0
            if(n<0 or k<0 ):
                return 0
            return fac[n]*(finv[k]*finv[n-k]%mod)%mod
    return CONV()



def main():
    N,M =isRaw()
    return min(str(N)*M,str(M)*N)


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

Submission status: Accepted

Solution code:
a,b=(int(x) for x in input().split())
la=[]
for i in range(b):
  la.append(str(a))
ao="".join(la)
lb=[]
for i in range(a):
  lb.append(str(b))
bo="".join(lb)
l=[]
l.append(ao)
l.append(bo)
l.sort()
print(l[0])

Submission status: Accepted

Solution code:

class Solution:
    def solve(self, a, b):
        str1 = "".join([str(b) for _ in range(a)])
        str2 = "".join([str(a) for _ in range(b)])

        if str1 <= str2:
            return str1
        else:
            return str2


sol = Solution()

[a, b] = list(map(int, input().strip().split(" ")))

print(sol.solve(a, b))

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

(a, b) = map(str, input().split())
if a>=b:
    for i in range(0,int(a)):
        print(b,end="")

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

Submission status: Accepted

Solution code:
import numpy as np
 
a, b = input().split()
 
s = []
s.append(a*int(b))
s.append(b*int(a))
 
s = np.sort(s)
 
print(s[0])

Submission status: Accepted

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

List = [a,b]
List.sort()

if  List[0] == a:
    combinea = ''
    for i in range(int(b)):
        combinea += a
    print(combinea)

else:
    combineb = ''
    for i in range(int(a)):
        combineb += b
    print(combineb)

Submission status: Accepted

Solution code:
def f(k):
    ret = ""
    for i in range(k):
        ret += "1"
    return int(ret)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a, b = map(lambda x: int(x), input().split())
lst = [str(a) * b, str(b) * a]
print(min(lst))

Submission status: Accepted

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

a, b = map(lambda x: int(x), input().split())
lst = [str(a) * b, str(b) * a]
lst.sort()
print(lst[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC152 B
a, b = tuple(input().split())
smaller = min(int(a), int(b))
larger = max(int(a), int(b))

rtStr = ""
for i in range(larger):
    rtStr += str(smaller)

print(rtStr)

Submission status: Accepted

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

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

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

print(min(x,y))

Submission status: Accepted

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

first = 0
second = 0

for i in range(0,num[0]):
    first = first + num[1]*(10**i)

for i in range(0,num[1]):
    second = second + num[0]*(10**i)

ans = max(first,second)

print(ans)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = ""
if a<b:
  for _ in range(b):
    c += "{}".format(a)
else:
  for _ in range(a):
    c += "{}".format(b)
print(c)

Submission status: Accepted

Solution code:
n, m = [int(x) for x in input().split()]
if n > m:
  [n, m] = [m, n]
print(str(n)*m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input().split(" ")
b = a[0] * int(a[1])
c = a[1] * int(a[0])
ar = [b,c]
ar.sort()
print(ar[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
class Solution:
    def solve(self, a: int, b: int) -> str:

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


if __name__ == '__main__':

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

    # solve
    solution = Solution()
    print(solution.solve(a, b))

Submission status: Accepted

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

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

ans=0

for i in range(ans2):
	ans=ans+ans1*10**i
	
print(ans)

Submission status: Accepted

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

list_a = [0]*int(b)
list_b = [0]*int(a)

for i in range(0,int(b)):
    list_a[i] = int(a)*10**i

for i in range(0,int(a)):
    list_b[i] = int(b)*10**i
    
a_r = sum(list_a) 
b_r =sum(list_b)

if(a<b):
    print(str(a_r))
elif(a>b):
    print(str(b_r))
else:
    print(str(a_r))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
a,b=input().split()
# print(a)
# print(b)
a_int =int(a)
b_int = int(b)
# print(a)
# print(b)
c = ""
if(a<b):
    for i in range(b_int):
        c += str(a)
    print(c)

else:
    for i in range(a_int):
        c += str(b)
    print(c)

Submission status: Accepted

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

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

#print(A, B)

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

print(C[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

ans=""
for i in range(int(q)):
    ans+=p
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if a == b:
    o = str(a)
    for i in range(b-1):
        o = o + str(a)
elif a > b:
    o = str(b)
    for i in range(a-1):
        o = o + str(b)
elif a < b:
    o = str(a)
    for i in range(b-1):
        o = o + str(a)
print(o)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

"""
name: A-500.py
プログラムの説明
"""

def main():
    a,b = map(int, input().split())
    all_a = str(a) * b
    all_b = str(b) * a

    # print(all_a)
    # print(all_b)

    if (all_a < all_b):
        print(all_a)
    else :
        print(all_b)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def repeat_string(x, y):
    """Return the digit x repeated y times."""
    single_string = str(x)
    repeat_string = single_string*y
    return repeat_string


def compare_strings(a, b):
    if a>b: return(repeat_string(b, a))
    return(repeat_string(a, b))


if __name__ == "__main__":
    test1 = "4 3"
    test2 = "7 7"
    test = test2
    test_input = map(int, input().split())
    print(compare_strings(*test_input))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
arr = list(map(int, input().split()))
ans = ''
for i in range(max(arr)):
    ans += str(min(arr))
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:
n = [int(e) for e in input().split(" ")]
if(n[0] == n[1]):
    print(str(n[0]) * n[0])
elif(n[0] < n[1]):
    print(str(n[0]) * n[1])
else:
    print(str(n[1]) * n[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

a, b = input().split()
a, b = int(a), int(b)
mini = str(min(a, b))
maxi = max(a,b)

print(mini*maxi)

Submission status: Accepted

Solution code:
N,M = map(int, input().split())
stN = ""
stM = ""
for i in range(0,N):
  stN = stN + str(M)
for j in range(0,M):
  stM = stM + str(N)
if stN <= stM:
  print(stN)
else:
  print(stM)

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

x = ""
y = ""

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

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

box = [x, y]
box.sort()

print(box[0])

Submission status: Accepted

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

a_array = []
for i in range(int(b)):
    a_array.append(a)
a_str = "".join(a_array)

b_array = []
for i in range(int(a)):
    b_array.append(b)
b_str = "".join(b_array)


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
a, b = [int(n) for n in sys.stdin.readline().split()]
l, h = min(a, b), max(a, b)
print(str(l)*h)

Submission status: Accepted

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

Submission status: Accepted

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

As = str(a) * b
Bs = str(b) * a

print(min(As, Bs))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from operator import itemgetter
import collections


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

    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(m,n):
    a=n*((10**m)-1)//9
    b=m*((10**n)-1)//9
    if a>b:
        return a
    else:
        return b 
m,n=map(int,input().split())
print(f(m,n))

Submission status: Accepted

Solution code:
a=[str(i) for i in input().split()]
if a[0]<=a[1]:
    b=[a[0] for i in range(int(a[1]))]
    b=''.join(b)
    print(b)
else:
    b=[a[1] for i in range(int(a[0]))]
    b=''.join(b)
    print(b)

Submission status: Accepted

Solution code:
def main():
    a, b = input().split()
    A = int(a*int(b))
    B = int(b*int(a))
    if A < B:
        print(B)
    else:
        print(A)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main(a, b):
    print(min(str(a) * int(b), str(b) * int(a)))


if __name__ == '__main__':
    a, b = input().split()
    main(a, b)

Submission status: Accepted

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