Search found 7 matches
- Wed Aug 15, 2007 11:33 am
- Forum: Volume 5 (500-599)
- Topic: 574 - Sum It Up
- Replies: 46
- Views: 15581
Thnkx. My Program passes all those. But still WA. Can Anybody Find any bug in my code: #include<iostream.h> #include<stdio.h> int sum,n,a[200],b[200],count; int place(int k,int i) { int j,s=0; b[k]=a[i]; for(j=0;j<=k;j++) s+=b[i]; if(s>sum) return 0; else return 1; } int sumf(int k,int i) { if(k>=n)...
- Mon Jul 16, 2007 11:06 am
- Forum: Volume 5 (500-599)
- Topic: 574 - Sum It Up
- Replies: 46
- Views: 15581
- Sun Apr 29, 2007 6:09 pm
- Forum: Volume 3 (300-399)
- Topic: 382 - Perfection
- Replies: 95
- Views: 22417
382,wrong answer
I can't guess why the following code is getting WA. Can anyone help me out, plz... ?? #include<iostream.h> #include<iomanip.h> #include<stdio.h> void main() { long int i; long int x,sum; cout<<"PERFECTION OUTPUT\n"; while(cin>>x&&x) { sum=1; for(i=2;i<=x/2;i++) { if(x%i==0) { sum+=...
- Sun Mar 18, 2007 3:32 am
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 29502
160 PE; Please help
here is the output
[
1
1!=
53
53!= 49 23 12 8 4 4 3 2 2 1 1 1 1 1 1
1
2
2!= 1
100
100!= 97 48 24 16 9 7 5 5 4 3 3 2 2 2 2
1 1 1 1 1 1 1 1 1 1
]
should the above output show presentation error?
please help......
[/code]
[
1
1!=
53
53!= 49 23 12 8 4 4 3 2 2 1 1 1 1 1 1
1
2
2!= 1
100
100!= 97 48 24 16 9 7 5 5 4 3 3 2 2 2 2
1 1 1 1 1 1 1 1 1 1
]
should the above output show presentation error?
please help......
[/code]
- Sat Mar 10, 2007 1:53 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10014 - Simple calculations
- Replies: 34
- Views: 9528
- Fri Mar 09, 2007 4:35 am
- Forum: Volume 100 (10000-10099)
- Topic: 10014 - Simple calculations
- Replies: 34
- Views: 9528
- Mon Mar 05, 2007 7:25 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10014 - Simple calculations
- Replies: 34
- Views: 9528
10014
t