10195 - The Knights Of The Round Table
Moderator: Board moderators
-
- Experienced poster
- Posts: 209
- Joined: Sun Jan 16, 2005 6:22 pm
10195
Here is my code.Plz tell me where is the mistakes?
#include<stdio.h>
#include<math.h>
void main()
{
double a,b,c,S,r;
while(1)
{
scanf("%lf %lf %lf",&a,&b,&c);
if(feof(stdin))
break;
S=(a+b+c)/2;
r = sqrt((S-a)*(S-b)*(S-c)/S);
printf("The radius of the round table is: %.3lf",r);
}
}
#include<stdio.h>
#include<math.h>
void main()
{
double a,b,c,S,r;
while(1)
{
scanf("%lf %lf %lf",&a,&b,&c);
if(feof(stdin))
break;
S=(a+b+c)/2;
r = sqrt((S-a)*(S-b)*(S-c)/S);
printf("The radius of the round table is: %.3lf",r);
}
}
-
- Experienced poster
- Posts: 209
- Joined: Sun Jan 16, 2005 6:22 pm
10195
Here is my code.Plz tell me where is the mistakes?
#include<stdio.h>
#include<math.h>
void main()
{
double a,b,c,S,r;
while(1)
{
scanf("%lf %lf %lf",&a,&b,&c);
if(feof(stdin))
break;
S=(a+b+c)/2;
r = sqrt((S-a)*(S-b)*(S-c)/S);
printf("The radius of the round table is: %.3lf",r);
}
}
#include<stdio.h>
#include<math.h>
void main()
{
double a,b,c,S,r;
while(1)
{
scanf("%lf %lf %lf",&a,&b,&c);
if(feof(stdin))
break;
S=(a+b+c)/2;
r = sqrt((S-a)*(S-b)*(S-c)/S);
printf("The radius of the round table is: %.3lf",r);
}
}
About 10195
That's The Main Case Of This Problem.
I Think Now You Get AC ASiF.
I Think Now You Get AC ASiF.
10195 - Java WA HEEEEELLLPPP
#JAVA
Guess im facing precision errors, can anyone please check it?
Thanx
[/quote]
Code: Select all
Accepted
Thanx
[/quote]
10195 WA WA WA
I dont know, why I am getting so glorious WAs(
)in this FALTOO problem.
If you know, why this GLORIOUS thing is happening to me... plz let me know...

If you know, why this GLORIOUS thing is happening to me... plz let me know...
Code: Select all
cut
[code]
Last edited by smilitude on Wed Oct 12, 2005 2:51 am, edited 1 time in total.
fahim
#include <smile.h>
#include <smile.h>
why I am reciving WA? Any idea, please? All seems to be perfect and task seems to be pretty simple...
Here is my code:
Thanx for any hint in advance!
Here is my code:
Code: Select all
program Prg10195(input, output);
{$APPTYPE CONSOLE}
uses
SysUtils;
{simple use of triangle formula???}
var
a,b,c,S,res: double;
resp: string;
begin
{
AssignFile(Input, 'in10__.txt');
Reset(Input);
AssignFile(Output, 'out10__.txt');
Rewrite(Output);}
while (not Eof) do begin
read(a);
read(b);
read(c);
if ((a=0.0) or
(b=0.0) or
(c=0.0)) then begin
res:=0.0;
end else begin
S:=((a+b+c)/2.0);
res:=sqrt(( (S-a)*(S-b)*(S-c) )/S);
end;
resp:=Format('The radius of the round table is: %.3f', [res]);
writeln(resp);
end;
end.
Is any established procedure (in the sense of usual quality management practices in software development industry) how to overcome this case - I have code (OK, pretty small - but this is not a issue here) that conforms to all imaginable test cases and it is rejected by judge... OK - usual advice here was - to publish code... I did - but no any feedbacj till now...
I can sey n-time pleaz, pleaz, pleaz - with hope - that it can help...
(((((((((((((((((
I can sey n-time pleaz, pleaz, pleaz - with hope - that it can help...

-
- Learning poster
- Posts: 62
- Joined: Sun Jul 09, 2006 8:31 am
- Location: University of Dhaka
- Contact:
Why WA
Why WA
Code: Select all
removed
Last edited by Debashis Maitra on Fri Dec 08, 2006 6:28 pm, edited 2 times in total.
Akash chhoyar swopno
Dream to touch the sky
Dream to touch the sky
-
- Learning poster
- Posts: 62
- Joined: Sun Jul 09, 2006 8:31 am
- Location: University of Dhaka
- Contact:
-
- New poster
- Posts: 7
- Joined: Mon Mar 05, 2007 3:24 pm
10195--CE
int main()
{
double a ,b ,c ,r ,s ,s2 ,area;
while (scanf("%lf %lf %lf",&a,&b,&c) != EOF)
{
s = ( a + b + c ) / 2.0;
area = sqrt(s * (s-a) * (s-b) * (s-c));
s2 = a + b + c;
r = 2.0 * area * (1.0 / s2);
printf("The radius of the round table is: %.3lf\n",r);
}
return 0;
}
i wrote this in C!
who can tell me why i got a CE?
thx
{
double a ,b ,c ,r ,s ,s2 ,area;
while (scanf("%lf %lf %lf",&a,&b,&c) != EOF)
{
s = ( a + b + c ) / 2.0;
area = sqrt(s * (s-a) * (s-b) * (s-c));
s2 = a + b + c;
r = 2.0 * area * (1.0 / s2);
printf("The radius of the round table is: %.3lf\n",r);
}
return 0;
}
i wrote this in C!
who can tell me why i got a CE?
thx
