結果

問題 No.722 100×100=1000
ユーザー 双六
提出日時 2020-08-30 02:48:38
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 671 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 82,480 KB
実行使用メモリ 115,920 KB
最終ジャッジ日時 2024-11-14 17:50:29
合計ジャッジ時間 11,604 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 24 TLE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	A, B = getlist()
	AA, BB = A, B
	n = 0
	m = 0
	while True:
		if A % 10 == 0:
			n += 1
			A = int(A // 10)
		else:
			break

	while True:
		if B % 10 == 0:
			m += 1
			B = int(B // 10)
		else:
			break

	if abs(A) < 10 and abs(B) < 10 and n >= 2 and m >= 2:

		ans = int(A * B * (10 ** ((n + m) - 1)))
		print(ans)
		return

	ans = AA * BB
	if abs(ans) < 10 ** 8:
		print(ans)
	else:
		print("E")






if __name__ == '__main__':
	main()
0