ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1874. Football Goal

test case #27
Posted by Choker 22 Oct 2011 16:19
what is wrong with test #27 ?
Re: test case #27
Posted by FeDoS (ONPU) 22 Oct 2011 19:47
try 1 10000
answer 25007071.3178118650
Re: test case #27
Posted by Submission accepted 23 Oct 2011 14:09
25007071.3178118655 for 1 10000. Accurate enough, but still wrong answer on test case #27.
Re: test case #27
Posted by Trevor Colby 25 Oct 2011 11:13
try 10000 1 may be
Re: test case #27
Posted by Xel 8 May 2013 14:09
In #27 system checks output format

I changed  my python solution

print FLOATANS
to
print "%0.6f" % FLOATANS

and get AC

Edited by author 08.05.2013 14:10
Re: test case #27
Posted by Maxim 24 Jan 2014 01:24
I had wrong answer on test 27, but corrected it by using "long double" type

There's my code

#include <cmath>
#include <iostream>
#include <iomanip>

using namespace std;

int main(int argc, char** argv) {
    ios_base::sync_with_stdio(0);
    long double a, b;
    cin >> a >> b;
    cout << setprecision(100) << fixed << (a*a + b*b)/4.0 + sqrtl(2.0)*a*b/2;
}