Hi Coders!
You are welcome to participate in the first ever math programming contest to be held by Hackerrank on March 28. For more details and registration, follow the link below :
https://www.hackerrank.com/infinitum-mar14
Happy Coding :)
| # | User | Rating |
|---|---|---|
| 1 | jiangly | 3810 |
| 2 | Benq | 3676 |
| 3 | Kevin114514 | 3655 |
| 4 | maroonrk | 3463 |
| 5 | strapple | 3447 |
| 6 | Um_nik | 3387 |
| 7 | heuristica | 3322 |
| 8 | turmax | 3317 |
| 9 | tourist | 3307 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 156 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | Um_nik | 141 |
| 5 | Errichto | 139 |
| 6 | adamant | 137 |
| 7 | AmShZ | 135 |
| 8 | BledDest | 132 |
| 9 | maroonrk | 131 |
| 10 | qwexd | 129 |
Hi Coders!
You are welcome to participate in the first ever math programming contest to be held by Hackerrank on March 28. For more details and registration, follow the link below :
https://www.hackerrank.com/infinitum-mar14
Happy Coding :)
| Name |
|---|



Just a reminder, contest starts in about 9 hrs!
I сouldn't find how long it will take, could you?
It written, 4 days.
whew, i finally solved the problem Devu Vs Police! that was a lot more hard work than i thought it would be!!!
PS: i will share my solution after the contest. ;)
EDIT: hmm, it seems my solution is much harder to describe than i initially thought. but here is the link to my submission. i hope its not too hard to understand, but if u want more detailed explanation on anything particular u can ask me. :)
Congrats.
Could you pls provide me an idea of the solution? My solution passed only half test.
PS: Also I solved the most hard problem Summing the K-N-R Series :)
This post might help you. You can also use x = maximum exponent in the prime factorization of n and C = φ(m) for a quick-and-dirty solution.
What is your complexity for K-N-R? It took me real effort to make my
solution to pass, I had to manually unroll loops and the alike. I don't think K-N-R was the hardest though, I put most work into "A very special multiple". But maybe I just used a stupid approach there. Does somebody have a rather simple solution for that?
My soultion for K-N-R is
too http://pastebin.com/itRUQiJt
It's was quite easy for me to find out a recursion formula on a sheet. I got 'Accepted' with the first attempt:)
UPD: Thank you for link, I was close.