九度教程第41题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=40
C语言源码:
#include<stdio.h>int is(int n){int a[7],i,j,top;top=0;while(n){a[top++]=n%10;n=n/10;}i=0;j=top-1;while(i<=j){if(a[i++]!=a[j--])return 0;}return 1;}int main(){int i;for(i=0;i<256;i++)if(is(i*i))printf("%d\n",i);}