Integer precision should be perfect up to about 4000 digits, which calculations in my kata shouldn't exceed. Maybe you're accidentally using floats somewhere? That's strange, if you're not
Whoops, it's fixed now. BTW, I'm going to rewrite the code so you return a tuple of [p, q] rather than p * q^-1 (mod 1e9 + 7) to make it easier for people to debug and stuff, just a heads-up.
just completed this; it was very fun! thank you
This comment is hidden because it contains spoiler information about the solution
I've added smaller tests
Integer precision should be perfect up to about 4000 digits, which calculations in my kata shouldn't exceed. Maybe you're accidentally using floats somewhere? That's strange, if you're not
.
ok, who knows if it's impossible to cheat on this kata but it's definitely a lot more difficult now
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Good problem
Yours is correct. It's fixed now - sorry about that.
(It's been updated now.)
Whoops, it's fixed now. BTW, I'm going to rewrite the code so you return a tuple of
[p, q]
rather thanp * q^-1 (mod 1e9 + 7)
to make it easier for people to debug and stuff, just a heads-up.I love this kata! Very creative idea :D
how have you golfed this...?? just wow, amazing
This comment is hidden because it contains spoiler information about the solution
Loading more items...