What on Earth Was the JetBrains Quest?
We have a lot of developers at JetBrains, and many of us like games – challenging games. We came up with the idea of creating a treasure hunt in which the solution to each puzzle was the hint for the next one. We’d hide all the puzzles as easter eggs inside JetBrains sources. After a long period of brainstorming, JetBrains Quest was born.
JetBrains Quest was a series of puzzles spread throughout different JetBrains pages and products. The game consisted of 3 Quests, with 4-6 puzzles to solve per quest. The first quest was relatively easy to give people a chance to figure out what to expect with the difficulty increasing as you moved along. The Quest began on March 9 with a post on our social media networks (Twitter, Facebook and Linkedin) and it ended on March 15 at 12:00 CET. At this point all of the puzzles were removed.
The response from the community was amazing!
Based on the comments, it looks like the most difficult puzzle to solve was the Fibonacci exercise. This puzzle was hidden inside a Tip of the Day in a specific version of IntelliJ IDEA Community Edition.
You have discovered our JetBrains Quest! If you don’t know what this is, you should start from the beginning.
This is it. The last puzzle. You are just one step away from glory!
Now you just need the Key to unlock the Quest page.
The Key is the first and last 4 digits of the 50 * 10^6 position of the Fibonacci sequence (F(50 Million)).
As you may know by now, not all that glitters is gold, and to solve this puzzle you should not go straight for the obvious answer. May you make a glorious choice.
Remember that you have until the 15th of March 12:00 CEST.
This was the last puzzle of the entire Quest. If you attempt to solve it using a linear approach, it will take hours or even days to get the answer. There were two main approaches to tackling this puzzle. The easy one was to use Wolfram|Alpha to get the first and last four digits.
The second way is more difficult, but it comes with a bonus: a bigger feeling of accomplishment! There are algorithms that make the computation for the Fibonacci sequence faster. We were expecting you to implement one of these options. Here’s an example:
import math def last_fib_digits(fib_number, last_digits): prev, cur = 0, 1 q = 10 ** last_digits while fib_number > 0: prev, cur = cur, prev + cur fib_number -= 1 cur %= q return prev def first_fib_digits(fib_number): phi = (math.pow(5.0, 0.5) + 1) / 2 logF = fib_number * math.log10(phi) - 0.5 * math.log10(5.0) return math.pow(10.0, logF - int(logF)) print(last_fib_digits(50000000, 4)) print(first_fib_digits(50000000))
First 4 digits: 4602
Last 4 digits: 3125
For those of you who didn’t manage to finish the Quest, you can see all the puzzles and their solutions here.
We would like to thank everyone who took part in our JetBrains Quest and joined in the fun. Leave a comment below and let us know which puzzle was your favorite.
Thanks for joining in! May you always have an adventure in your life!
– The JetBrains Quest Team
Subscribe to Blog updates
Thanks, we've got you!
JetBrains 8th Annual Hackathon: Home Edition
It is that time of year again! 48 hours of limitless freedom to play, create, and test out ideas that may go nowhere – or that might just change the world. Following the spirit of Hackathons, this year, we adapted and evolved, and borne our first JetBrains Hackathon: Home Edition, something it turns out that not many of our community members have tried. Our Hackathons bring together people that may not have otherwise cooperated before. Working in 10 cities across 7 countries with time zones as much as 5 hours’ difference, 48 teams made up of 155 participants set out to bring their projects to life.
JetBrains at the ICPC North America Championship 2020
The first ICPC North America Championship (ICPC NAC 2020) took place February 19–23, 2020. The top teams from the ICPC North America Regional Contests advanced to the ICPC NAC in Atlanta, Georgia, hosted by the College of Computing at the Georgia Institute of Technology. JetBrains was proud to be a …
JetBrains 7th Annual Hackathon: Arranged Differently
Arranging a new hackathon The arrangement With the expansion of JetBrains this year and the move into our new offices, we had to push back this year’s hackathon a little bit. But, if anything, this ignited the drive to develop new ideas in our team. So here is a rundown of what went down this year.…
Competition: How have JetBrains tools changed your life?
In preparation for our India Road Trip 2019, we want to hear from you about your experiences with JetBrains tools and how they have changed you. How has the choice you made to use JetBrains tools given you the chance you needed to change something in your life? It could be anything, from giving you…