The Reformed Devs on Slack began doing monthly code challenges a couple of months ago. We decided to begin hosting the challenges in the official TRD namespace for June 2019. You can see the previous challenges below:
Find the largest prime number in the Fibonacci sequence under 9,000,000,000,000,000,000 who's square, as hexidecimal, ends on 0x9.
Use a .sh file to output:
Author, Language, Result, Time, Notes
Author should be your Github account name.
Result should be an integer (no .0
)
Time should be in milliseconds.
Notes do not need to be filled in, that's up to you. Usually people include things like single/multi thread or the algorithm used.
The the sequence of Fibonacci numbers under 2000 is
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597
Of the above, 3, 5, 13, 89, 233, 1597
are prime.
The square of these primes, as hexidecimal are
0x9, 0x19, 0xa9, 0x1ef1, 0xd411, 0x26ea89
.
Since 1597's hexidecimal square (0x26ea89
) ends in 0x9
this is the answer.
The output for this, if it was found in Python would be
github_username, Python, 1597, 30, any notes about the implementation used
This will be a time challenge, so users will be scored based on the execution time of their solution in milliseconds.
Author | Language | Solution | Time (ms) | Notes |
---|---|---|---|---|
cco3 | Go | 433494437 | 0.10753059999999999 | |
pard68 | Rust | 433494437 | 0.1449238 | Miller-rabin |
pard68 | Python 3 | 433494437 | 0.42770379999979014 | the yeetiest |
specs | PHP | 433494437 | 0.5054000000000001 | ¯_(ツ)_/¯ |
zombeej | Node | 433494437 | 0.6358064 | blarg |
Pathfinder216 | Python | 433494437 | 0.8778944000027877 | Simple optimized |
ashok | Node | 433494437 | 31.2215998 | Scooby Power |
plusuncold | C++ | 433494437 | 715.6 |