結果

問題 No.442 和と積
ユーザー compass19
提出日時 2016-11-11 22:34:25
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 380 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 24,400 KB
最終ジャッジ日時 2024-11-25 08:31:26
合計ジャッジ時間 33,063 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 TLE * 1
other AC * 4 TLE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B=map(int,input().split())
S,T=A+B,A*B
res=1
S_dic={};T_dic={}
for i in range(2,S//2+1):
	while S/i == S//i:
		if i not in S_dic.keys():S_dic[i]=1
		else: S_dic[i]+=1
		S=S//i
for i in range(2,T//2+1):
	while T/i == T//i:
		if i not in T_dic.keys():T_dic[i]=1
		else: T_dic[i]+=1
		T=T//i
for k in S_dic.keys():
	if k in T_dic.keys():
		res*=k**min(S_dic[k],T_dic[k])
print(res)
0