Code
1 for(x=1;x<=n;x++)
2 {
3 y=(n+x-1)/x;
4 if(y<x)
5 break;
6 X=44*x+4;
7 Y=10*y+2;
8 A=X*Y;
9 if(A<rea ||( A==rea && abs(X-Y)<abs(rex-rey)))
10 {
11 rea=A;
12 rex=X;
13 rey=Y;
14 }
15
16 X=44*y+4;
17 Y=10*x+2;
18 A=X*Y;
19 if(A<rea || (A==rea && abs(X-Y)<abs(rex-rey)))
20 {
21 rea=A;
22 rex=X;
23 rey=Y;
24 }
25
26 }
posted @
2008-08-15 14:49
DosXP
阅读(
222)
评论()
编辑
收藏
举报