Submit | All submissions | Best solutions | Back to list |
EIUFING - Fingers |
Phuc's niece spread her hands and began counting from the thumb of her left hand: 1, 2, 3, ... Everything went as normal as the number 10 - on the thumb of her right hand - she turned around and count her index finger with 11 and likewise, count to the thumb of her left hand and then turn around. You see the picture to understand more:
After a while, the girl looked up and asked Mr. Phuc: "Which finger will number 99 be?". Phuc quickly answered, "The index finger of the right hand." She seemed unhappy because of his quickness, she asked, "That number is too small, so which number is 200?". Phuc told her that after the meal, he would answer because he knew she would keep asking until he was tired. During that time, he wanted to write a program to find the answer.
Input
A positive integer n (0 <n <231) is the number she will ask.
Output
The finger and hand follow the pattern: “Ngon Y cua ban tay Z”.
With Y ∈ {“cai”, “tro”, “giua”, “ap ut”, “ut”} and Z ∈ {“trai”,”phai”}.
Sample
Input99 |
OutputNgon tro cua ban tay phai |
Added by: | Ha Minh Ngoc |
Date: | 2015-12-11 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |