F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Searching

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 583    Accepted Submission(s): 107


Problem Description
"You know what?" Angel said, "There is a love-letter from me embeded on the lawn. And if you can find it, it's for you~"
"How can I find it on such a big lawn?"
"I will show you a hint: start from that tree which is in center of this lawn, and run directly to (X,Y) point. Please memorize the distance you'v passed. Then turn left with a angle A degree, and go ahead for k times of the length you'v passed in the first step. k is a real number from 0 to 1. When you arrive, repeat to turn left, and run for k times as far as the length of the last step. After many many times, you will reach a place, where I embed my letter..."
Of cause, Gardon wouldn't follow her hint simply. He just run there directly. Can you do it?
 

Input
Input have serveral test cases. Each cases have for real number: X,Y,A,k
 

Output
For each case, print the place where the treasure is embed.
 

Sample Input
1 0 90 0.5 1 0 90 0 1 0 0 0.5
 

Sample Output
(0.800,0.400) (1.000,0.000) (2.000,0.000)
 

Author
DYGG
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 16:40:22, Gzip enabled