9x9

AtCoder
IDabc144_a
Time2000ms
Memory256MB
Difficulty
Having learned the multiplication table, Takahashi can multiply two integers between $1$ and $9$ (inclusive) together. He cannot do any other calculation. Given are two integers $A$ and $B$. If Takahashi can calculate $A \times B$, print the result; if he cannot, print `-1` instead. ## Constraints * $1 \leq A \leq 20$ * $1 \leq B \leq 20$ * All values in input are integers. ## Input Input is given from Standard Input in the following format: $A$ $B$ [samples]
Samples
Input #1
2 5
Output #1
10

$2 \times 5 = 10$.
Input #2
5 10
Output #2
\-1

$5\times 10 = 50$, but Takahashi cannot do this calculation, so print `-1` instead.
Input #3
9 9
Output #3
81
API Response (JSON)
{
  "problem": {
    "name": "9x9",
    "description": {
      "content": "Having learned the multiplication table, Takahashi can multiply two integers between $1$ and $9$ (inclusive) together. He cannot do any other calculation. Given are two integers $A$ and $B$. If Takaha",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc144_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Having learned the multiplication table, Takahashi can multiply two integers between $1$ and $9$ (inclusive) together. He cannot do any other calculation.\nGiven are two integers $A$ and $B$.\nIf Takaha...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments