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.
This correct (and simple) solution does not pass tests in C++. Do you still claim that there are no performance requirements in C++? You need to be lucky with compiler optimizations (or know about possible optimizations) to pass all tests with an inefficient solution.
There're no performance requirements in C++ whatsoever.
I've already linked the discussion explaining what's wrong with this kata's performance requirements. Please, consider learning to read instead of resolving issues based on random bullshit reasoning.
Please specify that Python uses
1e8
instead of something on the order of2^64
.You are unnecessarily making it a guessing game again.
The performance requirements are vastly different across the languages.
Please see the Troubleshooting Guide in Docs -> Training.
Ask yourself why you are not even passing the sample tests. Read the description carefully.
Also, know there will be tests with very large numbers. An
O(n)
solution won't cut it.This comment is hidden because it contains spoiler information about the solution
Bro wanna be carti so bad
thats deep
Spoiling solutions is forbidden. To unlock solutions to a 6 kyu kata, you just need to reach the 7 kyu level. That's just solving a few elementary katas, it should be very easy. If you're not able to do it, you probably don't deserve to approve your exams!
I am a student in a university and I would need to have an answer to this exercise which could unlock me for one of my exams. Thank you I am studying for my January exams so this is really important!