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.
what's wrong with it running in O(n)?.
The instructions said nothing of that!
This comment is hidden because it contains spoiler information about the solution
I've seen this in almost every code posted for this. Which would be the best way to complete this task if not these?
@fakeID I'm sorry, I don't follow. What do you mean?
two plus two is four
minus one that's three, quick maths
как же ты прав. 3 года пытался научиться программировать. тупо читал книги и смотрел ютюб. повторял как попугай за всеми. и вот 4 дня назад нашел этот сайт.
и знаешь что: за 3 дня прогресса больше чем за последние 3 года. я кайфую прям.
This comment is hidden because it contains spoiler information about the solution
Да, ты прав! Всего наилучшего на пути к программированию!
Я тоже новичек и решил таким же способом. Это только начало, у нас еще все лучшее в переди.
Yes. Maybe my for my next kata published, I may actually get on the leaderboard on authored katas.
warning: sounds good, yes (actually, expecting outputs smaller than the input is just an error in the reasonning, yes)
2dan: 5.0% left. Hence... Still some months to go, I guess x) (maybe still in 2020. 'Will mostly depend on my motivation. Which is pretty low these days... :/ )
Also, added message that shows n and k.
@Blind4Basics
Some solutions rely on the highest n can be, so maybe not. Should I just warn users that the result may be way larger than
1e6
.Btw, how far are you from 2 dan, I'm just curious;-)
The numbers tested are less than 10^6. However, the result may be larger
@tonylicoding: are those restrictions really needed? maybe just remove them, warning the user that huge numbers will be tested too? (you could add one or two of this kind of sample tests to make it clear)?
(Python)
In kata descrition there is a note:
1<n<10^6
1<k<10
I have some failing tests and this is the output of one of them:
"81514610699888 should equal 5094663168743"
Those numbers are much bigger than 10^6
Log output should be more descriptive like: for n=some value (k=val2) should equal: val3
Loading more items...