LARSQR - Largest Square in a Circle
Farmer john has a circular field in which he plants cotton crops.He noticed that, the crops that are planted in a square area yielded good quality crops compared to others.So farmer john decides to plant crops only in a square fashion so as to attain maximum profit. Help john in determining the maximum area in which he can plant and harvest good quality crops.
Input
The first line contains t (Number of testcases < 1000) and t testcases follow each specifying the diameter d of the circular field where d < 10^6.
Output
Maximum plantable area.
Example
Input:
3
7
12
29
Output:
24.50
72.00
420.50
hide comments
r19:
2017-08-13 07:02:35
format to 2 decimals after the point. it should be in the problem statement Last edit: 2017-09-02 00:17:35 |
|
Xsquare:
2011-12-24 10:55:03
what if we directly print the result...why its giving wrong answer?
|
|
Mohamed Fouad:
2011-03-21 10:00:55
Thank you. |
|
numerix:
2011-03-21 10:00:55
It's a tutorial problem. They do not appear in the list of solved problems. |
|
Mohamed Fouad:
2011-03-21 10:00:55
Why after solving this problem was it not added to the list of solved problems? |
Added by: | Infinity |
Date: | 2011-02-12 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ADA95 ASM32 ASM64 BASH CLPS CLOJURE LISP sbcl LISP clisp D ERL FSHARP FORTRAN GO ICON ICK JS-RHINO LUA NEM NICE OCAML PHP PIKE PRLG-swi SCM guile SCM qobi ST TCL WHITESPACE |
Resource: | Own |