Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I just realized that this is a very old kata, but oh well. Still.
Cool kata, but I don't really understand why the input and answer are stringified when it could just be an array of coefficients for both. Most of my answer was just handling the formatting, but isn't that really secondary to what the problem statement is asking from us?
Comparison of unsigned long to int. It wouldn't have mattered. But it's fixed.
My lack of paying attention and not fully reading the description caused me to write out my own DFA which I spent hours hammering out... on the other hand, that made me really brush up on subjects that I didn't give much thought to in school, so very good Kata indeed ^^
Thanks for adding this, I enjoyed it.
The difference between someone who knows how to use Python's standard library and someone who doesn't (e.g., me)
Nice
Basically a cleaner version of my solution, very nice!
facepalm
I just realized I left in the test case from writing in my local env... big oof
Thank you so much for asking this question @PatrickSile and for answering so clearly @agkg
Very nice, I still have a lot to learn about what is even possible in Python.
boo on me for having no imagination I guess :/
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Ah, one thing I will say though, I was gonna use random numbers from 2..n for
a
(thus theimport random
), but it turns out if you just use the first few primes fora
it's enough to confidently test up to a very largen
, more than enough for the range of this problemLoading more items...