Comparing Strings

AtCoder
IDabc152_b
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
Input #1
4 3
Output #1
3333

We have two strings `444` and `3333`. Between them, `3333` is the lexicographically smaller.
Input #2
7 7
Output #2
7777777
API Response (JSON)
{
  "problem": {
    "name": "Comparing Strings",
    "description": {
      "content": "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 i",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc152_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "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 i...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments