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.
great kata.
lots of ppl using dicts and specifying month values but neither is necessary
Prolog translation
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I agree, the types used in a kata should not depend on one particular compiler implementation. In particular, if you need an integer type that must hold values larger than what fits in 32 bit, it would be better to use one of the fixed-width integer types from cstdint, e.g. int64_t.
Rejected for using outdated language version.
Forking is still possible, so no work is necessarily lost.
very fun kata! :)
For C, if n is a + b and both a and b are non-negative, then why does the function pass in a signed value (and why is it "const")? That needless complictes this clever problem.
You are probably solving on 64-bit Windows where
long
is 32-bit. Codewars runs on 64-bit Linux wherelong
is 64-bit. As a quickfix, you can uselong long
in your solution. But I agree, this is an issue, C/C++ code on Codewars should never uselong
as it makes the user experience worse for Windows users.finally solved...cant believe it! after expeding some time a day trying to optimice. Learnt a lot :3
C Translation
in c++ input parameter has type long, but 10e10 numbers can't fit into long, maybe change to long long?
This kata is SOO GOOD!
I've spent a whole day figuring out how to optimize the code, since it timed-out at random tests. It made me go through the rabbit hole of finding out how the summation of digits works and how to MAX the result and minimize the number of iterations.
Honestly, this mixture of frustration and EUREKA! is what I'm looking for.
very fun and interesting
I solved this kata 4 fours ago. There is no any problem with test digits.
Loading more items...