|
||||||||||
Least common multipleTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1273 Accepted Submission(s): 434 Problem Description bobo has an integer set S={x1,x2,¡,xn}, where xi=2ai * 3bi. For each non-empty subsets of S, bobo added the LCM (least common multiple) of the subset up. Find the sum of LCM modulo (109+7). Input The input consists of several tests. For each tests: The first line contains n (1¡Ün¡Ü105). Each of the following n lines contain 2 integers ai,bi (0¡Üai,bi¡Ü109). Output For each tests: A single integer, the value of the sum. Sample Input
Sample Output
Author Xiaoxu Guo (ftiasch) Source | ||||||||||
|