問題一覧 > 通常問題

No.722 100×100=1000

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 256
作問者 : %20 / テスター : ciel
お気に入りにしたユーザー ProblemId : 2200 / 自分の提出
問題文最終更新日: 2026-06-25 05:08:33
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Show the original
yukicoder contest 197 (順位表) の他の問題:

Problem Statement

Yuki is about to calculate $A×B$ for integers $A,B$.
If $A,B$ can be expressed as "$A=a×10^n,B=b×10^m$" using "integers $a,b$ whose absolute values are at least $1$ and at most $9$" and "integers $n,m$ that are at least $2$", Yuki calculates mentally. Otherwise, Yuki calculates using a calculator.
When Yuki calculates mentally, the number of consecutive $0$s at the end of the result ends up being reduced by $1$.
The calculator Yuki uses can only handle numbers of up to $8$ digits. If the result of the calculation is at least -99999999 and at most 99999999, the calculator correctly displays the result. Otherwise, the calculator displays E.
What is the result of Yuki's calculation of $A×B$?

Input

$A$ $B$

The input satisfies the following constraints.

  • $-99999999\le A,B\le99999999$
  • $A,B$ are integers

Output

Output the result of Yuki's calculation on $1$ line.

Sample

Sample 1
Input
-123 -456
Output
56088

Yuki calculated using the calculator.

Sample 2
Input
100 100
Output
1000

Yuki calculated mentally and made a mistake.

Sample 3
Input
10000 12345
Output
E

Yuki used the calculator, but the result of the calculation did not fit in $8$ digits.

Sample 4
Input
30000000 -70000000
Output
-210000000000000

Yuki calculated mentally and made a mistake.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。