December 2019 2 42 Report
Tolong bantuin PR komputer Saya kak


Jumlah Pembagi
===================
Time Limit: 1000 ms
Memory Limit: 32 MB
===================
Divisors of an integer N are all positive numbers that are no more than N that divides N. Value of F(N) is the sum of all N divisors. Example: Divisors of 12 are: 1, 2, 3, 4, 6, 12, so F(N) = 1 + 2 + 3 + 4 + 6 + 12 = 28.

Given two integers A and B, you are asked to count F(AB) mod 1000000007. Note: 00 = 1.

Input
Input starts with an integer T represents the number of test cases (T ≤ 100). Each of next T lines consists of 2 integers A and B (0 ≤ A, B ≤ 100000000).

Output
Output consists of T lines, each line consists of an integer F(AB) mod 1000000007.
=================
Sample Input :

3
12 1
2 1
100000000 100000000

Sample Output :
28
3
246897934

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.