MAXLN  THE MAX LINES
In this problem you will be given a halfcircle. The halfcircle’s radius is r. You can take any point A on the halfcircle and draw 2 lines from the point to the two sides of the diameter(AB and AC). Let the sum of square of one line’s length and the other line’s length is s
Like in the figure s = AB^{2} + AC. And BC = 2r.
Now given r you have to find the maximum value of s. That is you have to find point A such that AB^{2} + AC is maximum.
Input
First line of the test case will be the number of test case T (1 <= T <= 1000). Then T lines follows. On each line you will find a integer number r (1 <= r <= 1000000); each representing the radius of the halfcircle.
Output
For each input line, print a line containing "Case I: ", where I is the test case number and the maximum value of s. Print 2 digit after decimal (Errors should be less then .01).Example
Sample Input: 1 1 Sample Output: Case 1: 4.25
hide comments
mohit_010:
20211116 11:41:02
AC AFTER 5 WA


Waseem Ahmed:
20210704 13:30:45
Simple one line answer. Not a SPOJ level problem. Disheartened.


varuntumbe:
20201018 08:07:40
can i some one tell me why it works for double and not for float. 

imposter_1729:
20200723 15:16:20
try making 180 degree.. and for the second line look at the given sample test case!!! 

ayush_12349:
20200630 13:20:26
In CPP, by default, big numbers will be printed in an "e" format. So, make sure that you do this to match the output format :


this_variable:
20200529 17:11:28
Java Bois be careful with this one! :) 

rohit_world:
20200521 10:12:08
Try long double. The value is fixed for AC. Try to find it. Use iomanip for setting precision and fixed for normal format. Last edit: 20200521 10:12:35 

rohit7ks:
20191227 13:02:29
Use joseph louis theorem, AC in one go 

Saurav Singhi:
20191012 02:34:29
spoiler alert for java. 1 WA for not remembering java's default typecasting during evaluation of regular expressions. 

sanket17:
20190710 10:39:04
if you got the logic then use of double ,float not required

Added by:  Muhammad Ridowan 
Date:  20110328 
Time limit:  1s1.679s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Own Problem(used for CSE,University of Dhaka, Newbies Contest) 