| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:为什么就WRONG ANSER,和别人已ac一样,,求高手解读一下In Reply To:为什么就WRONG ANSER,和别人已ac一样,,求高手解读一下 Posted by:940817335 at 2012-07-26 20:54:38 > #include<stdio.h>
> int main()
> {
> int i,j,k,l,N;
> while(scanf("%d",&N)!=EOF)
> {
> for(i=2;i<=N;i++)
> for(j=1;j<=N;j++)
> for(k=1;k<=N;k++)
> for(l=1;l<=N;l++)
> if(i*i*i==j*j*j+k*k*k+l*l*l&&j<=k&&j<=l&&k<=l)
>
> printf("Cube= %d, Triple = (%d,%d,%d)\n",i,j,k,l);
> }
> // getchar();
> // getchar();
> return 0;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator