AtCoder Beginner Contest 144
翻译中…
Problem Statement
翻译中…
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
翻译中…
Output
翻译中…
If Takahashi can calculate $A \times B$, print the result; if he cannot, print -1.
翻译中…
样例
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
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。