Recall the definition of the Fibonacci numbers: <br><pre>f1 := 1 <br>f2 := 2 <br>fn := f<sub>n-1</sub> + f<sub>n-2</sub> (n&gt;=3) </pre> <br>Given two numbers a and b, calculate how many Fibonacc…

2020年1月17日 0条评论 1307点热度 0人点赞 code 阅读全文

Gustavo knows how to count, but he is just now learning how to write numbers. He has already learned the digits 1, 2, 3, and 4. But he does not yet realize that 4 is different than 1, so he thinks that 4 is just another way to write 1. He is having fun with a …

2020年1月17日 0条评论 1621点热度 0人点赞 code 阅读全文

The <em>Stern-Brocot tree</em> is a beautiful way for constructing the set of all non-negative fractions <span class="MATH"><img src="/admin/../upload/pimg1532_1.png" alt="$ {m \over n}$" align="MIDDLE" border="0" height="25" width="17">…

2020年1月17日 0条评论 1052点热度 0人点赞 code 阅读全文

<p>This problem seeks the coefficients resulting from the expansion of the polynomial</p> <p align="justify"></p> <div align="CENTER" class="mathdisplay"><i>P</i> = (<i>x</i><sub>1</sub> + <i…

2020年1月17日 0条评论 1208点热度 0人点赞 code 阅读全文

Given any integer 0 &lt;= n &lt;= 10000 not divisible by 2 or 5, some multiple of n is a number which in decimal notation is a sequence of 1's. How many digits are in the smallest such a multiple of n?

2020年1月17日 0条评论 1457点热度 0人点赞 code 阅读全文

Stan and Ollie play the game of multiplication by multiplying an integer p by one of the numbers 2 to 9. Stan always starts with p = 1, does his multiplication, then Ollie multiplies the number, then Stan, and so on. Before a game starts, they draw an integer …

2020年1月17日 0条评论 1027点热度 0人点赞 code 阅读全文