[BOJ 13371] Dolphin

View as PDF

Submit solution

Points: 2
Time limit: 1.0s
Memory limit: 512M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

Dolphin is a well-known ice-breaking activity in Thailand. In order to play this game, everyone has to sit in circle. MC will select one person as a starting player. Each person, in clockwise order, has to shout the correct phrase in the dolphin sequence which is “1 dolphin, 1 jump, splash, 2 dolphins, 2 dolphins, 2 jumps, 2 jumps, splash, splash, 3 dolphins, 3 dolphins, 3 dolphins, 3 jumps, 3 jumps, 3 jumps, splash, splash, splash, …” and so on. The game ends when there is one person who shout incorrect phrase. You know that you are n-th person to shout. As a programmer, you want to write a program to calculate the phrase you need to need to shout out.

입력 형식

The first line will contain the number of test cases T (1 ≤ T ≤ 1000)</p>

For each test case, there is an input n (1 ≤ n ≤ 2 000 000 000)

출력 형식

For each test case, print the n-th phrase in the dolphin sequence.

예제 입력

5
1
2
3
4
100

예제 출력

1 dolphin
1 jump
splash
2 dolphins
8 jumps

Comments

There are no comments at the moment.