标签:des style blog io color sp for 数据 div
1 #include <stdio.h> 2 3 int main(){ 4 int number; 5 int i; 6 int j; 7 int k; 8 int flag_k; 9 int flag_j; 10 11 while(scanf("%d",&number)!=EOF){ 12 flag_k=0; 13 flag_j=0; 14 15 for(i=1;i<=100;i++){ 16 for(j=1;j<=100;j++){ 17 for(k=1;k<=100;k++){ 18 if(i*i+j*j+k*k==number){ 19 printf("%d %d %d\n",i,j,k); 20 flag_k=1; 21 break; 22 } 23 } 24 25 if(flag_k==1){ 26 flag_j=1; 27 break; 28 } 29 } 30 31 if(flag_j==1) 32 break; 33 } 34 35 } 36 37 return 0; 38 }
标签:des style blog io color sp for 数据 div
原文地址:http://www.cnblogs.com/zqxLonely/p/4084938.html