

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 200 点
問題文
1 桁の正整数 a ,b が与えられます。整数 a を b 回繰り返してできる文字列と 整数 b を a 回繰り返してできる文字列のうち、辞書順で小さい方を答えてください。
制約
- 1 ≤ a ≤ 9
- 1 ≤ b ≤ 9
- a,b は整数
入力
入力は以下の形式で標準入力から与えられる。
a b
出力
2 つの文字列のうち辞書順で小さい方を出力せよ。(2 つの文字列が等しいときは、そのうちどちらかを出力せよ。)
入力例 1
4 3
出力例 1
3333
できる 2 つの文字列は、444
と 3333
です。このうち辞書順で小さい文字列は 3333
です。
入力例 2
7 7
出力例 2
7777777
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