HZNUOJ

ST Task

Tags:
Time Limit:  1 s      Memory Limit:   64 MB
Submission:103     AC:23     Score:98.67

Description

You get a ST task, that is: given a stick one end of who is moored on the ground, you are asked to turn over the stick by holding the other end. When it reaches the ground again, the task is finished. It is true that on the process, the stick is always on the same plane vertical the ground. And on this plane, there is light from up to down, so that we can see on the ground a line of shadow. Look at the picture:

In order to express the shadow part and the un-shadow (light space) part, to simple the problem we just need to express the length that 2 times of the length of the stick where the shadow may occur.

Now, give the problem: the stick on the beginning is on the left of the moored point, and we turn it on certain angular speed, using a ‘S’ to denote one unit of the light space and a ‘T’ for one unit of the shadow line. Besides that, a real number is needed to tell the scale between the shadow line and the full line where shadow may be.

Input

There is only one case. Two integers L (0 < L ≤ 25) and V (0 < V ≤ 90) is given.

L is the length of the stick; V is the angular speed of the turning task, in angle per second.

Output

For every second during the task, you are asked to tell the shape of the shadow on the ground. See the sample: ‘S’ for the light space and ‘T’ for the shadow.

Samples

input
25 15
output
TTTTTTTTTTTTTTTTTTTTTTTTTSSSSSSSSSSSSSSSSSSSSSSSSS 0.50000 STTTTTTTTTTTTTTTTTTTTTTTTSSSSSSSSSSSSSSSSSSSSSSSSS 0.48296 SSSTTTTTTTTTTTTTTTTTTTTTTSSSSSSSSSSSSSSSSSSSSSSSSS 0.43301 SSSSSSSTTTTTTTTTTTTTTTTTTSSSSSSSSSSSSSSSSSSSSSSSSS 0.35355 SSSSSSSSSSSSTTTTTTTTTTTTTSSSSSSSSSSSSSSSSSSSSSSSSS 0.25000 SSSSSSSSSSSSSSSSSSSTTTTTTSSSSSSSSSSSSSSSSSSSSSSSSS 0.12941 SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS 0.00000 SSSSSSSSSSSSSSSSSSSSSSSSSTTTTTTSSSSSSSSSSSSSSSSSSS 0.12941 SSSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTSSSSSSSSSSSS 0.25000 SSSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTSSSSSSS 0.35355 SSSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTSSS 0.43301 SSSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTS 0.48296 SSSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTT 0.50000

Hint

If the stick is 3 in length, and the shadow line is 1.49, we have the answer this moment: SSTSSS  0.24833
If the stick is 3 in length, and the shadow line is 1.51, we have the answer this moment: STTSSS  0.25167
That is, the number of ‘T’ always is the nearest integer of the length of shadow.
【As we know, the compiler of our OJ(Online Judge) may regard 3.6500 as 3.649999999, so you'd better be careful when use double, especially in roundings. A good solution is add (or minus if the number is negtive) 1e-7 when you rounds a float number. Besides, avoiding the use of double as far as possible is also a good idea.
You can refer this link to find more skills [ http://www.cnblogs.com/acsmile/archive/2011/05/09/2040918.html ]. (I had sent this link to our Water Group already. Have fun! ^_^ )
——noted by CYP】

Source

湖南大学2009校赛