python 3.x - Convert string to respective data type ie. int or long (python3) -
temp=input() l=list(map(int,temp.split())) count=0 in range (1,min(l[0],l[1])+1): if l[0]%i==0 , l[1]%i==0: count+=1 print (count)
above code takes 2 or more numbers , finds count of common factors. range these numbers 1 10**12.
how handle both int , long data types in code? kindly help.
as opposed python 2, python 3 doesn't distinguish between int
, long
(long
gone python 3). it's integer can longer 64-bit.
from python 3 documentation
Comments
Post a Comment