I think my code gives the right answers but why WA please give some critical input
/*problem for solving nCk
Author :-Vivek Sharma */
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
long double n,k;//binomial coefficient
while(cin>>n>>k)
{
if(n==0&&k ...
Search found 13 matches
- Fri Sep 28, 2007 10:22 am
- Forum: Volume 5 (500-599)
- Topic: 530 - Binomial Showdown
- Replies: 137
- Views: 49056
- Tue Mar 20, 2007 7:44 am
- Forum: C
- Topic: problem with c code
- Replies: 5
- Views: 6884
- Mon Mar 19, 2007 7:57 am
- Forum: C
- Topic: problem with c code
- Replies: 5
- Views: 6884
- Tue Feb 13, 2007 10:32 pm
- Forum: C
- Topic: problem with c code
- Replies: 5
- Views: 6884
problem with c code
hi i have an problem with my c code
#include<iostream>
using namespace std;
int main()
{
int k=35;
printf("%d %d %d %d ",k==35,k=50,k,k>40);
return 0;
}
why the output of these problem is
0 50 35 0
- Sun Feb 04, 2007 9:17 pm
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 64411
- Fri Feb 02, 2007 5:04 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10200 - Prime Time
- Replies: 202
- Views: 96715
- Fri Feb 02, 2007 4:27 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10200 - Prime Time
- Replies: 202
- Views: 96715
- Fri Feb 02, 2007 11:12 am
- Forum: Volume 102 (10200-10299)
- Topic: 10200 - Prime Time
- Replies: 202
- Views: 96715
10200
hi friend why i am getting time limit exceed
remove
- Mon Jan 29, 2007 10:35 pm
- Forum: Volume 5 (500-599)
- Topic: 576 - Haiku Review
- Replies: 50
- Views: 22442
- Mon Jan 29, 2007 7:11 am
- Forum: Volume 104 (10400-10499)
- Topic: 10424 - Love Calculator
- Replies: 137
- Views: 59844
- Fri Nov 10, 2006 3:46 pm
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45178
- Mon Oct 16, 2006 9:49 pm
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45178
160-wa
here is my code cant find the error values are correct, format is correct but still get WA.....
so plz help me
CODE IS DELETED
thanx in advance[/quote]
so plz help me
CODE IS DELETED
thanx in advance[/quote]
- Tue Oct 10, 2006 10:14 am
- Forum: Volume 5 (500-599)
- Topic: 591 - Box of Bricks
- Replies: 80
- Views: 24937
591 with P.E
This is my code cant find why i get P.E
plz help me
#include<iostream>
using namespace std;
int main()
{
int i=1,k,h[100];
cin>>k;
while(k!=0)
{
int sum=0;
for(int j=0;j<k;j++)
{
cin>>h[j];
sum=sum+h[j];
}
int t=sum/k;
int s=0;
for(int j=0;j<k;j++)
{
if(h[j]>t)
s=s+(h[j]-t ...
plz help me
#include<iostream>
using namespace std;
int main()
{
int i=1,k,h[100];
cin>>k;
while(k!=0)
{
int sum=0;
for(int j=0;j<k;j++)
{
cin>>h[j];
sum=sum+h[j];
}
int t=sum/k;
int s=0;
for(int j=0;j<k;j++)
{
if(h[j]>t)
s=s+(h[j]-t ...