We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
枚举法就是从所有候选答案中搜索出正确的解,满足两个条件:
将数字带入下面式子,使等式成立:
#include <stdio.h> #include <stdlib.h> int main() { int a1,a2,a3,a4,a5; long multi,result; for(a1=1;a1<=9;a1++) { for(a2=0;a2<=9;a2++) { for(a3=0;a3<=9;a3++) { for(a4=0;a4<=9;a4++) { for(a5=0;a5<=9;a5++){ multi = a1*10000 + a2*1000 + a3*100 + a4*10 + a5; result = a5*100000 + a5*10000 + a5*1000 + a5*100 + a5*10 + a5; if(multi*a1 == result){ printf("\n%5d%2d%2d%2d%2d\n",a1,a2,a3,a4,a5); printf("X%12d\n",a1); printf("_____________\n"); printf("%3d%2d%2d%2d%2d%2d",a5,a5,a5,a5,a5,a5); } } } } } } getch(); return 0; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
枚举法就是从所有候选答案中搜索出正确的解,满足两个条件:
demo
将数字带入下面式子,使等式成立:
code
result
The text was updated successfully, but these errors were encountered: