Submit Best Submissions All Submissions

164. Circle Of Death

Problem Statement:
Ants are social insects, which means they live in large colonies or groups, some colonies consist of millions of ants, if you watch ants for any length of time you will see that they really do communicate with each other and very effectively too, they communicate by touching each other with their antennae, ants also use chemicals called pheromones to leave scent trails for other ants to follow.
A side effect of the self-organizing structure of ant colonies is ant mill a phenomenon in which, the ants seem to have gone insane, walking in an endless circle together, the cause of this behavior is the technology ant societies use for ground navigation, they follow pheromone trails on the ground laid down by other ants, or they simply follow other ants visually, the system works well normally, a scout ant goes out and finds something, other ants go back to get more by following the scent trail, or by following each other.
However, if a loop created, the ants will march blindly, circling until they die.

An ant got mad of its colony and decided to make massacre, this ant will surround its colony by a cycle of pheromone forcing most of its members to run amok and die tragically, given the radius of this colony try to help nature getting rid of these undeveloped sufficiently creatures by calculating the length of this pheromone circle of death.

Input Format:
Your program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 <= T <= 100). Followed by the test cases, each test case contains one integer R (1 <= R <= 100) representing the radius of the colony.

Output Format:
For each test case, print on a single line, a single number representing the expected length of pheromone line needed, rounded to two decimal places.

Sample Input:
1 1

Sample Output:

Added by: feras_kassar
Added at: 2014-05-19 20:19:58 UTC
Time Limit: 2 seconds
Partial score: No
Source:Tishreen-CPC 2014