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: Runtime Error

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

a_str=""
b_str=""
for i in range(a):
  b=b+str(b)
for i in range(b):
  a=a+str(a)
if int(a_str) > int(b_str):
  print(b_str)
elif int(a_str) < int(b_str):
  print(a_str)
else:
  print(a_str)

Submission status: Runtime Error

Solution code:
Input = input().spilit()
Input[0] = int(Input[0])
Input[1] = int(Input[1])

i = 0

if Input[0] > Input[1]:
  print(str(Input[0])*Input[1])

elif Input[1] > Input[0]:
  print(str(Input[1])*Input[0])

else:
  print(str(Input[0])*Input[0])

Submission status: Runtime Error

Solution code:
s = input().split()
if s[0] > s[1]:
  for i in range(s[0]):
  	print(s[1],end="")
else:
  for i in range(s[1]):
    print(s[0],end="")

Submission status: Runtime Error

Solution code:

input = list(map(int, input().split()))
A = input[0]
B = input[1]
output = []
 
output.append(str(B) * A)

output.append(str(A) * B)

output.sort

print(output[0])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

a = T[0]
b = T[1]

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = input().split()
a_w = a * int(b)
b_w = b * int(a)

if a => b:
  print(b_w)
else:
  print(a_w)

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

if li[0]>=li[1]:
  print(li[1]＊int(li[0]))
else:
  print(li[0]＊int(li[1]))

Submission status: Runtime Error

Solution code:
N,M = input().split(" ")
if N > M:
  
    str = str(M)
    print(str*N)

else:
    str = str(N)
    print(str*M)

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if a>=b:
  print(b＊int(a))
else:
  print(a＊int(b))

Submission status: Runtime Error

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

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

print(a if n <= m else b)

Submission status: Runtime Error

Solution code:
hoge = input().split(" ")
for i in range(int(hoge[1])):
  a += hoge[0]
for i in range(int(hoge[0])):
  b += hoge[1]
txt = [a,b]
txt.sort
print(a[0])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
a1=str(a)＊b
b1=str(b)＊a

if a>=b:
  print(b1)
elif a<b:
  print(a1)

Submission status: Runtime Error

Solution code:
#coding:utf-8

n = int(input())
nums = map(int, input().split(' '))

if a >= b:
    print(''.join([str(b)] * a))
else:
    print(''.join([str(a)] * b))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

ans = [ab, ba].sort

print(ans[0])

Submission status: Runtime Error

Solution code:
txt = input().split(" ")
txt.sort
print(a[0])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!python3

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

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

    if a > b:
        a, b = b, a
    print(f"{a}"*b)

if __name__ == "__main__":
    resolve()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
u = input()

a = u[0];
b = u[2];
at = int(a)
bt = int(b)

x = at*b
y = bt*a

if(x < y)
{
  print(x)
}
else
{
 print(y)
}

Submission status: Runtime Error

Solution code:
def func():
    return

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

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans1 = ""
ans2 = ""
for i in range(b):
  ans1.append(a)

for i in range(a):
  ans2.append(b)
  
print(ans1, ans2)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

s1 = ''
s2 = ''

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

print(_1 if s_1<=s_2 else s_2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        String ans = "";
        if (a < b) {
            for (int i = 0; i < b; i++) {
                ans += a;
            }
        } else {
            for (int i = 0; i < a; i++) {
                ans += b;
            }
        }

        System.out.println(ans);
    }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def my_round(a,dig=0): # 四捨五入
    p = 10 ** dig
    return (a * p * 2 + 1) // 2 / p

def round_up(a): # 切り上げ
    return int(a + 0.9)

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): #最小公倍数
    return a/gcd(a,b)*b

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): #素因数分解
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

def main():
    a,b = map(int,input().split())
    ans = []
    if a < b:
        for i in ragne(b):
            ans.append(str(a))
    else:
        for i in range(a):
            ans.append(str(b))
    print(''.join(ans))
    return

if __name__=='__main__':
    main()