Palindromic Squares
来源:互联网 发布:淘宝排名查询 客户达 编辑:程序博客网 时间:2024/06/09 19:16
Problem:
Palindromic Squares
Rob Kolstad
Palindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome.
Given a number base B (2 <= B <= 20 base 10), print all the integers N (1 <= N <= 300 base 10) such that the square of N is palindromic when expressed in base B; also print the value of that palindromic square. Use the letters 'A', 'B', and so on to represent the digits 10, 11, and so on.
Print both the number and its square in base B.
PROGRAM NAME: palsquare
INPUT FORMAT
A single line with B, the base (specified in base 10).
SAMPLE INPUT (file palsquare.in)
10
OUTPUT FORMAT
Lines with two integers represented in base B. The first integer is the number whose square is palindromic; the second integer is the square itself.
SAMPLE OUTPUT (file palsquare.out)
1 12 43 911 12122 48426 676101 10201111 12321121 14641202 40804212 44944264 69696
My Answer:
- Palindromic Squares
- palindromic squares
- Palindromic Squares
- Palindromic Squares
- Palindromic Squares
- Palindromic Squares
- Palindromic Squares
- Palindromic Squares
- Palindromic Squares
- Palindromic Squares(USACO)
- USACO 1.2-Palindromic Squares
- 1.2.4 Palindromic Squares
- Section 1.2 Palindromic Squares
- usaco 1.2:Palindromic Squares
- [USACO] Palindromic Squares
- usaco Palindromic Squares
- USACO 1.2 Palindromic Squares
- USACO Palindromic Squares
- 用两个打火机做的摩托车
- V8 JavaScript Engine 编译与使用注意事项-使用V8
- 报道啦
- return语句在函数之外
- ls算法
- Palindromic Squares
- [转]Unix常用命令
- OpenGL内存泄漏之主循环函数glutMainLoop()
- Processing a Request to Remove a Device
- 现阶段的想法2010年12月10日22:19:04
- Mixing Milk
- DirectX的安装与D3D的初始化
- 信号量与自旋锁
- 在VC中生成嵌套JSON