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

Just a Math Problem

Time Limit: 20000/15000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 1274    Accepted Submission(s): 375


Problem Description
Little Ruins is a studious boy, recently he learned math!

Now he defines $f(k$) equal the number of prime factors in $k$, and $g(k) = 2^{f(k)}$, he want to know

$$\sum_{i = 1}^{n} g(i)$$

Please help him!
 

Input
First line contains an integer $T$, which indicates the number of test cases.

Every test case contains one line with one integer $n$.

Limits
$1 \leq T \leq 50$.
$1 \leq n \leq 10^{12}$.
 

Output
For every test case, you should output 'Case #x: y', where x indicates the case number and counts from 1 and y is the result.

Because y could be very large, just mod it with $10^9 + 7$.
 

Sample Input
3 1 10 100
 

Sample Output
Case #1: 1 Case #2: 23 Case #3: 359
 

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-04-16 21:07:30, Gzip enabled