結果

問題 No.722 100×100=1000
ユーザー mnr
提出日時 2020-03-03 19:46:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 858 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-29 19:53:21
合計ジャッジ時間 2,117 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

def make_a_list(i):
    iab = abs(i)
    L = list(str(iab))
    return L

def div10(L):
    if len(L) >= 3:
        for i in range(1,len(L)):
            if L[-i] != '0':
                return "calculator"
            elif i == len(L)-1 and L[i] == '0':
                return "in_her_head"
    elif len(L) < 3:
        return "calculator"

def judge(des_a, des_b):
    if des_a == "in_her_head" and des_b == "in_her_head":
        return "in_her_head"
    else:
        return "calculator"

def cal(des):
    if des == "in_her_head":
        print(int(A*B / 10))
    elif des == "calculator":
        if abs(A*B) > 99999999:
            print('E')
        elif abs(A*B) <= 99999999:
            print(A*B)


A, B = map(int,input().split())
la = make_a_list(A)
lb = make_a_list(B)
wa = div10(la)
wb = div10(lb)

des = "undecided"
des = judge(wa,wb)
cal(des)
0