def ilcm(*args):
 if (len(args) < 2):
  raise TypeError(('ilcm() takes at least 2 arguments (%s given)' % len(args)))
 if (0 in args):
  return 0
 a = args[0]
 for b in args[1:]:
  a = ((a * b) // igcd(a, b))
 return a

def ilcm ( * args ) : if ( len ( args ) < 2 ) : raise TypeError ( ( 'ilcm() takes at least 2 arguments (%s given)' % len ( args ) ) ) if ( 0 in args ) : return 0 a = args [ 0 ] for b in args [ 1 : ] : a = ( ( a * b ) // igcd ( a , b ) ) return a
computes integer least common multiple .