Determine focal length of a spherical mirror
School Accuracy: 29.37% Submissions: 1134 Points: 0

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

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.