시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 65 | 53 | 48 | 81.356% |
The Fibonacci sequence is a famous integer sequence defined by Leonardo of Pisa in 1202. The sequence is defined as follows:
What you may not know is that Frodo of Bag End also defined an integer sequence called the Frodo sequence. Frodo’s sequence is defined as follows:
You need to write a program that given n finds Fron.
he input will be a sequence of integers, one per line. The end of input will be signaled by the integer 0. All integers, other than the last (zero), are positive and less than 231.
For each positive integer, n, print Fron.
2 4 5 6 0
1 2 3 3
High School > PLU High School Programming Contest > PLU 2013 > Novice 11번