temp=input()
l=list(map(int,temp.split()))
count=0
for i in range (1,min(l[0],l[1])+1):
if l[0]%i==0 and l[1]%i==0:
count+=1
print (count)
Run Code Online (Sandbox Code Playgroud)
上面的代码需要 2 个或更多的数字并找到公因数的数量。这些数字的范围是 1 到 10**12。
如何处理这段代码中的 int 和 long 数据类型?请帮忙。