結果
| 問題 | No.442 和と積 |
| コンテスト | |
| ユーザー |
compass19
|
| 提出日時 | 2016-11-11 22:34:25 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 380 bytes |
| 記録 | |
| コンパイル時間 | 778 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 28,416 KB |
| 最終ジャッジ日時 | 2026-05-19 21:21:34 |
| 合計ジャッジ時間 | 5,880 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 17 |
ソースコード
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)
compass19