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

Interesting Numbers

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 235    Accepted Submission(s): 122


Problem Description
  To play with the numbers is always interesting. Here is just one! Look at the number: 9376. We notice that: 9376 * 9376 = 87909376 with the last four digits the same as the number itself!
  Here comes the problem. What the i-th number of this kinds of the number? Suppose that 0 is the first one.
 

Input
There are exactly 26 cases. Process to the end of file
Each case begin with N (1 <= N <= 26) in one line.
 

Output
Output the N-th number each in one line. It is promised that the number would be fit the 64-bit integer.
 

Sample Input
1 2 3
 

Sample Output
0 1 5
 

Author
ZSTU
 

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 15:49:15, Gzip enabled