結果

問題 No.722 100×100=1000
ユーザー RK Python
提出日時 2020-06-22 14:45:29
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 560 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-29 19:56:16
合計ジャッジ時間 2,216 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B = input().split()
az = A[1:].count("0")
bz = B[1:].count("0")
c1 = (len(set(list(A))) == 2 and A[0] != 0 and az == len(A)-1)
c2 = (len(set(list(A))) == 3 and A[0] == "-" and az == len(A)-2)
c3 = (len(set(list(B))) == 2 and B[0] != 0 and bz == len(B)-1)
c4 = (len(set(list(B))) == 3 and B[0] == "-" and bz == len(B)-2)
if (c1 or c2) and (c3 or c4) and (len(str(abs(int(A)))) > 2 and len(str(abs(int(B)))) > 2):
    print(str(int(A)*int(B))[:-1])
else:
    ab = int(A)*int(B)
    if -99999999 <= ab <= 99999999:
        print(ab)
    else:
        print("E")
0