10773 - Back to Intermediate Math
Moderator: Board moderators
10773 wa help plz
removed
Last edited by Honour_00 on Tue Jul 24, 2012 7:55 pm, edited 1 time in total.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 10773 wa help plz
Input:AC output:
Code: Select all
3
8 5 6
1 2 3
1 5 6
3
8 5 6
1 2 3
1 5 6
Code: Select all
Case 1: 1.079
Case 2: 0.114
Case 3: 0.135
Check input and AC output for thousands of problems on uDebug!
-
- New poster
- Posts: 1
- Joined: Wed Aug 08, 2012 2:13 pm
Re: please help me why i am getting WA for my code ?
i think every thing is right no problem is there.brianfry713 wrote:What's the problem number?

-
- New poster
- Posts: 1
- Joined: Mon Sep 24, 2012 6:55 am
Re: please help me why i am getting WA for my code ?

jimmgiht
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: please help me why i am getting WA for my code ?
There's no code here.mikhelee12 wrote:i ve checked so many critical input output . i am still getting WA ,,, plz anybody help me,,,, plz,,,, i am trying this for a long time ..... here's my code:
Check input and AC output for thousands of problems on uDebug!
Re: please help me why i am getting WA for my code ?
delete
Last edited by bimajw on Thu Nov 15, 2012 5:09 am, edited 1 time in total.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: please help me why i am getting WA for my code ?
The output shouldn't start with a blank line.
Check input and AC output for thousands of problems on uDebug!
-
- Learning poster
- Posts: 96
- Joined: Tue Apr 23, 2013 12:54 pm
Re: please help me why i am getting WA for my code ?
#include <stdio.h>
#include <math.h>
int main(int argc, const char * argv[])
{
long long int test,d,v,u,i;
scanf("%lld",&test);
for (i=1; i<=test; i++) {
scanf("%lld %lld %lld",&d,&v,&u);
if (u<=v||u==0) {
printf("Case %lld: can't determine\n",i);
continue;
}
printf("Case %lld: %.3lf\n",i,(1.*d/sqrt(u*u-v*v)-d*1./u));
}
return 0;
}
here is my code. It seems everything all right to me.. But wrong answer.. So please help me to find the bug///
#include <math.h>
int main(int argc, const char * argv[])
{
long long int test,d,v,u,i;
scanf("%lld",&test);
for (i=1; i<=test; i++) {
scanf("%lld %lld %lld",&d,&v,&u);
if (u<=v||u==0) {
printf("Case %lld: can't determine\n",i);
continue;
}
printf("Case %lld: %.3lf\n",i,(1.*d/sqrt(u*u-v*v)-d*1./u));
}
return 0;
}
here is my code. It seems everything all right to me.. But wrong answer.. So please help me to find the bug///
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: please help me why i am getting WA for my code ?
what if v is 0?
Check input and AC output for thousands of problems on uDebug!
Re: 10773 - Back to Intermediate Math
If someone could please take a look at this code. It's sick, I've read all your previous hints and still getting WA on it.
Last edited by zlenyk on Tue Oct 21, 2014 2:42 pm, edited 1 time in total.
Re: 10773 - Back to Intermediate Math
Use code tags. My advice to you -> always copy/paste output format from sample or problem description.
Sample Output
Your Output
Don't forget to remove your code after getting accepted. 
Sample Output
Code: Select all
Case 1: 1.079
Code: Select all
Case #1: 1.079

A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Re: 10773 - Back to Intermediate Math
There is just no way I made such mistake! Thank you very much.