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
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


anon_007:
20190623 09:00:01
use of setprecision is must costed me 4 WAs... 

aj_254:
20190523 21:48:52
5 line code in python remember output format cose me one WA. very easy qusetion just need to diffretiate 

pandey101299:
20190208 13:52:56
Easy one but use double for sum 

cypher33:
20190104 17:17:34
Stupid Output format costed me 2 WA.... That was fair dinkum pain in the butt 

prabhav_123:
20190102 22:36:09
\n costed me 1 WA, LOL! 

Rahul Kathuria:
20181119 13:20:13
test Last edit: 20181119 13:26:03 

saket13:
20180829 21:17:39
Be aware of the output format(Case 1: ans)


akjol2049:
20180823 20:10:10
OMG...just (2*r)^2 and 0.25. Always the case:). As limit of angle between AB and diagonal approaches to 180. 
Added by:  Muhammad Ridowan 
Date:  20110328 
Time limit:  0.680s1.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) 