結果

問題 No.722 100×100=1000
ユーザー iad_2889
提出日時 2019-05-15 05:04:10
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-12 12:05:57
合計ジャッジ時間 1,970 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13 WA * 12 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

def calc(A,B):
    a = abs(A)
    b = abs(B)
    ans = A * B
    _ans = str(ans)
    minus = _ans[0] == "-"
    if minus:
        _ans = _ans[1:]

    if 1 <= a <= 9 or 1 <= b <= 9 or not A % 10 and not B % 10:
        if _ans[-1] == "0":
            ans = _ans[:-1]
    else:
        if len(_ans) > 8:
            ans = "E"
        else:
            ans = _ans
    if ans != "E" and minus:
        ans = "-" + ans
    return ans


A,B = map(int,input().split())
print(calc(A,B))
0