Determine focal length of a spherical mirror
Submissions: 877   Accuracy:

28.8%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Find the focal length of the spherical mirror with the given radius-of-curvature R.

Input:
The first line of the input contains a positive integer T, denoting the number of test cases. For each test case , there will be two lines. First line contains type of mirror, and second line contain R (Radius of curvature).

Output:
For each testcase, print the floor of the focal length.

Constraints:
1 <= T <= 100
1 <= R <= 100

Example:
Input:
2
convex
67.67
concave
3.31

Output:
-34
1

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ankit Sharma
Author: Soul_xhacker


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.