CORN - Corn Headache

Once Jhon wanted to eat corn but the shopkeeper has many corns of different sizes having same price.

Jhon wants the bigger corn but When he observes all corns he found that many small size corns have more seeds than bigger one so he needs your help in choosing the corn.

As the corn shape is almost like cone and You are good in mathematics (assume you are :P) Jhon wants you to select the corn for him and tell him the total number of seeds on this corn.

Input

First line of input is 't' - number of test cases. In each of the next t lines There are three numbers, R - radius of the biggest part of corn, and S - The number of seeds in corn per cm2, and H - the height of the corn. This is in the following form:

          ReSeH

R, S, H < 1000 and Pi = 3.1415

Output

Only one integer, the number of seeds on each corn.

Example

Input:
1
2e4e20

Output:
506

Added by:Losser
Date:2016-02-10
Time limit:0.100s-1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 CSHARP GO GOSU JAVA JS-RHINO JS-MONKEY NICE PHP PYTHON PYPY PYTHON3 PY_NBC RUBY SCALA CHICKEN
Resource:....

hide comments
2023-10-28 04:40:30
Are numbers like "1e2" (100) to be expected? Cannot get AC
2023-01-27 12:56:45
got ac in one go :)
just consider it as a cone to use the formula and remember to ceil the answer
2021-06-08 05:02:34 Rafail Loizou
Correction: He doesn't actually want you to select the best he needs you to output for each test case the number of seeds on the given corn. Cost me 3 WAs. You can use this test case:
2
2e4e20

Answer:
506
506
2e4e20



Last edit: 2021-06-08 05:02:46
2018-12-20 08:43:54
finally solved.learnt a lot.
2018-10-24 22:49:23
Ac in one go.. But got only 0.2 points
2017-08-09 20:52:09 Radha Krishna
covered many concepts. :)
2017-06-22 16:35:47
AC in 0ne g0..... :-)
good concept
0.6 points for me
2017-06-07 11:21:03
very easy problem after separating R,S,H
2017-01-16 19:28:30
@author At least mention that r,s,h can be floats too.......read from comments it was so-_-
2017-01-07 09:09:28
Really interested problem...
New concept...
0.5 points for this problem...
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.