UVa 10892 LCM Cardinality (数论&素因子分解)2014-04-26 csdn博客 synapse710892 - LCM CardinalityTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php? option=com_onlinejudge&Itemid=8&category=467&page=show_problem&problem=18 33A pair of numbers has a unique
LCM but a single number can be the
LCM of more than one possible pairs. For example
12 is the
LCM of
(1, 12),
(2, 12),
(3,4) etc. For a given positive integer
N, the number of different integer pairs with
LCM is equal to
N can be called the
LCMcardinality of that number
N. In this problem your job is to find out the
LCM cardinality of a number.InputThe input file contains at most 101 lines of inputs. Each line contains an integer N (0<N<=2*10
9). Input is terminated by a line containing a single zero. This line should not be processed.OutputFor each line of input except the last one produce one line of output. This line contains two integers
N and
C. Here
N is the input number and
Cis its cardinality. These two numbers are separated by a single space.Sample Input Output for Sample Input