結果
| 問題 | No.722 100×100=1000 |
| コンテスト | |
| ユーザー |
iad_2889
|
| 提出日時 | 2019-05-15 05:54:08 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 97 ms / 2,000 ms |
| コード長 | 511 bytes |
| 記録 | |
| コンパイル時間 | 444 ms |
| コンパイル使用メモリ | 20,832 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-06-03 13:51:48 |
| 合計ジャッジ時間 | 4,839 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
ソースコード
def calc(A,B):
def _(num):
n = abs(num)
cnt = 0
while n and not n % 10:
n//=10
cnt+=1
return 1 <= n <= 9 and cnt >= 2
ans = str(A * B)
minus = ans[0] == "-"
if minus:
ans = ans[1:]
if _(A) and _(B):
if ans[-1] == "0":
ans = ans[:-1]
else:
if len(ans) > 8:
ans = "E"
if ans != "E" and minus:
ans = "-" + ans
return ans
A,B = map(int,input().split())
print(calc(A,B))
iad_2889