TREEBONACCI - Threebonacci
A number belongs to Threebonacci sequence if it belongs to Fibonacci (consider 1 as being the first number in this sequence) sequence and satisfy at least one criteria below:
- The number representation contains at least one digit 3.
- The number is a multiple of 3.
Input
Each test case contains an integer N (1 ≤ N ≤ 60). Input ends with EOF.
Output
For each test case print a single line containing the Nth term in Threebonacci sequence.
Example 1
Input: 1 3 Output: 3 21
hide comments
jrantor:
2020-12-10 20:51:10
I am getting WA, can I get some test cases?
|
Added by: | Coach UTN FRSF |
Date: | 2015-09-01 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 GOSU JS-MONKEY |