F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

RXD and math

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)
Total Submission(s): 2163    Accepted Submission(s): 1128


Problem Description
RXD is a good mathematician.
One day he wants to calculate:
$$\sum_{i = 1}^{n^k}{\mu^2(i) \times \lfloor \sqrt{\frac{n^k}{i}} \rfloor}$$
output the answer module $10^9+7$.
$1\leq n, k\leq 10^{18}$
$$\mu(n) = 1 (n = 1)$$
$$\mu(n) = (-1)^k (n = p_1p_2\dots p_k)$$
$$\mu(n) = 0(otherwise)$$
$p_1,p_2,p_3\dots p_k$ are different prime numbers
 

Input
There are several test cases, please keep reading until EOF.
There are exact 10000 cases.
For each test case, there are 2 numbers $n, k$.
 

Output
For each test case, output "Case #x: y", which means the test case number and the answer.
 

Sample Input
10 10
 

Sample Output
Case #1: 999999937
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 11:13:38, Gzip enabled