Search found 10 matches
- Tue Mar 20, 2012 10:12 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10190 - Divide, But Not Quite Conquer!
- Replies: 105
- Views: 38442
Re: 10190 - Divide, But Not Quite Conquer!
still wrong ans....
- Tue Mar 20, 2012 12:54 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10190 - Divide, But Not Quite Conquer!
- Replies: 105
- Views: 38442
Re: 10190 TE why? please help me any body
now i get wrong answer.....
- Tue Mar 20, 2012 10:57 am
- Forum: Volume 3 (300-399)
- Topic: 386 - Perfect Cubes
- Replies: 53
- Views: 16978
Re: 386 - Perfect Cubes [WA]
thanks.... but still time limit... 

- Tue Mar 20, 2012 10:55 am
- Forum: Volume 101 (10100-10199)
- Topic: 10190 - Divide, But Not Quite Conquer!
- Replies: 105
- Views: 38442
Re: 10190 - Divide, But Not Quite Conquer!
what is wrong with my code??? #include<stdio.h>
int main()
{
int n,m,k,i,h,a[100];
while(scanf("%d%d",&n,&m)==2)
{
if(m<2 || n<2 || n<m)
printf("Boring!");
else
{
k=1;
a[0]=n;
for(i=1;i<=100;i++)
{
a[i]=n/m;
n=a[i];
if(n==0)
break;
k++;
}
for(i=0;i<k-1;i++)
{
if(a[i]%m!=0 ...
int main()
{
int n,m,k,i,h,a[100];
while(scanf("%d%d",&n,&m)==2)
{
if(m<2 || n<2 || n<m)
printf("Boring!");
else
{
k=1;
a[0]=n;
for(i=1;i<=100;i++)
{
a[i]=n/m;
n=a[i];
if(n==0)
break;
k++;
}
for(i=0;i<k-1;i++)
{
if(a[i]%m!=0 ...
- Mon Mar 19, 2012 6:08 pm
- Forum: Volume 3 (300-399)
- Topic: 386 - Perfect Cubes
- Replies: 53
- Views: 16978
Re: 386 - Perfect Cubes [WA]
what is the prblm with my cose??? #include<stdio.h>
#include<math.h>
int main()
{
int a,b,c,d,pa,pb,pc,pd;
for(a=6;a<=200;a++)
{
pa=pow(a,3);
for(d=2;d<a;d++)
{
pd=pow(d,3);
for(c=d+1;c<a;c++)
{
pc=pow(c,3);
for(b=c+1;c<a;b++)
{
pb=pow(b,3);
if(pa==pb+pc+pd)
printf("Cube = %d, Triple ...
#include<math.h>
int main()
{
int a,b,c,d,pa,pb,pc,pd;
for(a=6;a<=200;a++)
{
pa=pow(a,3);
for(d=2;d<a;d++)
{
pd=pow(d,3);
for(c=d+1;c<a;c++)
{
pc=pow(c,3);
for(b=c+1;c<a;b++)
{
pb=pow(b,3);
if(pa==pb+pc+pd)
printf("Cube = %d, Triple ...
- Fri Sep 09, 2011 3:50 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10812 - Beat the Spread!
- Replies: 35
- Views: 24590
Re: 10812 - Beat the Spread!
i m getting w.a..... here is my code
#include<stdio.h>
//#include<iostream.h>
int main()
{
int t,s,d,i,j;
scanf("%d",&t);
while(t>0)
{
scanf("%d%d",&s,&d);
if(s<d)
{
printf("impossible\n");
goto m;
}
for(i=d;i<=s;i++)
{
for(j=0;j<=d;j++)
{
if(i+j==s && i-j==d)
{
goto l ...
#include<stdio.h>
//#include<iostream.h>
int main()
{
int t,s,d,i,j;
scanf("%d",&t);
while(t>0)
{
scanf("%d%d",&s,&d);
if(s<d)
{
printf("impossible\n");
goto m;
}
for(i=d;i<=s;i++)
{
for(j=0;j<=d;j++)
{
if(i+j==s && i-j==d)
{
goto l ...
- Mon Aug 29, 2011 6:04 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10323 - Factorial! You Must be Kidding!!!
- Replies: 106
- Views: 47463
Re: 10323 - Factorial! You Must be Kidding!!!
thankssss/......
got accepted......

got accepted......
- Sun Aug 21, 2011 12:57 am
- Forum: Volume 103 (10300-10399)
- Topic: 10323 - Factorial! You Must be Kidding!!!
- Replies: 106
- Views: 47463
Re: 10323 - Factorial! You Must be Kidding!!!
remove code after accepted.....
- Thu Aug 18, 2011 10:37 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10190 - Divide, But Not Quite Conquer!
- Replies: 105
- Views: 38442
Re: 10190 TE why? please help me any body
i got presentation error... here is my code...[/code]
#include<stdio.h>
int main()
{
int n,m,k,i,j,a[200000];
while(scanf("%d%d",&n,&m)!=EOF)
{
i=0;
if(m<2 || n<m)
{
printf("Boring!");
goto l;
}
while(n>0)
{
if(n%m==0 || n==1)
{
a =n;
n/=m;
i++;
}
else
{
printf("Boring ...
#include<stdio.h>
int main()
{
int n,m,k,i,j,a[200000];
while(scanf("%d%d",&n,&m)!=EOF)
{
i=0;
if(m<2 || n<m)
{
printf("Boring!");
goto l;
}
while(n>0)
{
if(n%m==0 || n==1)
{
a =n;
n/=m;
i++;
}
else
{
printf("Boring ...
- Thu Aug 18, 2011 10:33 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11417 - GCD
- Replies: 11
- Views: 8225
Re: 11417 - GCD
can i solve 11424 in this way.....
if i give same code .... verdict is time limit......
if i give same code .... verdict is time limit......