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

Palindrome day

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 515    Accepted Submission(s): 121


Problem Description
A palindrome integer is a number that we can get the same value when read from left to right or from right to left. For example, 1221,20100102.
We can define a palindrome day as follow: its standard form is a palindrome integer, and, it must be a valid day. 20100102 is OK, but 23200232 is not for it is not a valid day.
Which day is the Kth palindrome day from 10000101?
 

Input
The first line is an integer T indicating the case number.
For each case, there is an integer K(1<=K<=4000000).
 

Output
Output the Kth palindrome day.
The standard form is always YY...YMMDD, no leading zeros.
YY...Y : the year.
MM : the month.
DD : the date.
 

Sample Input
2 1 45
 

Sample Output
10011001 20100102
 

Author
lxhgww
 

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-05-12 01:48:13, Gzip enabled