Search found 4 matches

by Radha
Wed Nov 06, 2002 5:42 am
Forum: Volume 3 (300-399)
Topic: 344 - Roman Digititis
Replies: 15
Views: 6614

WA for this code

hello,
i don't know why i get WA for this code.

[c]
#include<stdio.h>
#define MAX 100

void main()
{
int i,n[MAX],no,ni,nv,nx,nl,nc,one,ten,j;
char temp[120];
int s[100][5];
i=0;
while(1)
{
scanf("%d",&n );
if(n == 0)
break;
i++;
}
no = i;
s[0][0] = 1;
s[0][1] = s[0][2] = s[0][3] = s ...
by Radha
Sat Aug 03, 2002 5:14 pm
Forum: Volume 3 (300-399)
Topic: 305 - Joseph
Replies: 41
Views: 8188

Thanks,
i did that and i got it accepted, but why did my program code got wrong answer. can you help me?
by Radha
Sat Aug 03, 2002 10:30 am
Forum: Volume 3 (300-399)
Topic: 305 - Joseph
Replies: 41
Views: 8188

ok here is the code:

#include<stdio.h>
main()
{
long pre[50],i,ng[1000],n1,nwin,n,j,nk,k,nb,m1,m;
char c,temp[120];
i = 0;
while(1)
{
scanf("%s",temp);
sscanf(temp,"%ld",&ng );
if(ng == 0)
break;
i++;
}
nk = i;
for(k=0;k<nk;k++)
{
n=ng[k] * 2;
for(m=1; ; m++)
{
nb=0;
nwin = 1;
for(j ...
by Radha
Fri Aug 02, 2002 5:16 pm
Forum: Volume 3 (300-399)
Topic: 305 - Joseph
Replies: 41
Views: 8188

i get a wrong answer for this question.the answers fro values 1 to 13 are
2
7
5
30
169
441
1872
7632
1740
93313
459901
1358657
2504881
are these correct?
thanks

Go to advanced search