SGU 107

 1 #include<stdio.h>
 2 #include<math.h>
 3 //#define suf 987654321
 4 
 5 int main(){
 6       //测试使用,暴力解出n=9时的8个解,平方后缀是否为suf只与其后9位有关
 7       /*for(long long i=sqrt(suf*1.0);i<1000000000;i++){
 8         if((i*i)%(1000000000)==suf){
 9             printf("%lld
",i);
10         }
11     }*/
12     int n;
13     while(~scanf("%d",&n)){
14         if(n<9){
15             puts("0");
16         }
17         else if(n==9){
18             puts("8");
19         }
20         else{
21             printf("72");
22             for(int i=1;i<n-9;i++){
23                 printf("0");
24             }
25             puts("");
26         }
27     }
28 }
原文地址:https://www.cnblogs.com/Stomach-ache/p/3703197.html