Least common multiple

TimeLimit:3000MS  MemoryLimit:131072KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
bobo has an integer set S={x 1,x 2,…,x n}, where x i=2 ai * 3 bi.

For each non-empty subsets of S, bobo added the LCM (least common multiple) of the subset up. Find the sum of LCM modulo (10 9+7).
Input
The input consists of several tests. For each tests:

The first line contains n (1≤n≤10 5). Each of the following n lines contain 2 integers a i,b i (0≤a i,b i≤10 9).
Output
For each tests:

A single integer, the value of the sum.
SampleInput
2
0 1
1 0
3
1 2
2 1
1 2
SampleOutput
11
174
Submit
题目统计信息详细
总AC数2
通过人数2
尝试人数3
总提交量3
AC率66.67%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: