这一次又只出了一题,第二题没有分析好,竟然直接copy代码,不过长见识了。。
第一题给了一些限制条件,自己没有分析好,就去乱搞,结果各种不对,后来有读题才发现。。暴力乱搞。。
题目:
Beautiful Palindrome Number
Time Limit: 3000/1500 MS (
Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 657 Accepted Submission(s): 369
Problem Description
A positive integer x can represent as
(a1a2…akak…a2a1)10
or
(a1a2…ak?1akak?1…a2a1)10
of a 10-based notational system, we always call x is a Palindrome Number. If it satisfies
0
, we call x is a Beautiful Palindrome Number.
Now, we want to know how many Beautiful Palindrome Numbers are between 1 and
10N
.
Input
The first line in the input file is an integer
T(1≤T≤7)
, indicating the number of test cases.
Then T lines follow, each line represent an integer
N(0≤N≤6)
.
Output
For each test case, output the number of Beautiful Palindrome Number.
Sample Input
2
1
6
Sample Output
9
258
Statistic | Submit | Clarifications | Back
代码:
#include
#include
#include
#include
#include