Under construction

Still being built. Things may change

Yeehaa!

Time limit1sMemory limit128 MB

Summary
Given the large circle radius R and the count n of equal small circles packed around the inside rim, compute the small circle radius r.
Level

Easy3 of 10

Topics
Geometry, Math, Implementation
Solved
No attempts yet

Problem

George wants to become a western hero, so he dreams of a special revolver that can fire more than the usual six shots. The cylinder that holds the bullets looks like the figure below (examples for 6 and 17 bullets):

Figure 1: Examples

There is one large circle of radius RR, and nn small circles of radius rr placed inside it along its border. To make the bullets as large as possible, the small circles are packed with no gaps: each small circle is tangent to the large circle and also to its two neighboring small circles. Given RR and nn, compute rr.

Input

The first line contains the number of scenarios. Each of the following lines describes one scenario and contains a real number RR and an integer nn, with 1≤R≤1001 \le R \le 100 and 2≤n≤1002 \le n \le 100.

Output

For each scenario, first print a line Scenario #i:, where ii is the scenario number starting at 1. On the next line, print the value of rr rounded to three decimal places. Separate consecutive scenarios with a blank line.

Examples1

  1. Example 1

    Input
    4
    4.0 6
    4.0 17
    3.14159 100
    42 2
    
    Expected output
    Scenario #1:
    1.333
    
    Scenario #2:
    0.621
    
    Scenario #3:
    0.096
    
    Scenario #4:
    21.000