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.
You don't need parentheses, it will multiply first and then subtract, even if you put a minus sign before the multiplication.
it inverses the bool.
code representation:
bool b = true;
std::cout << b << '\n'; // true
std::cout << !b << '\n'; // false
it's called the NOT operator.
visual representation:
true ------[!]------> false
false ------[!]------> true
constant time complexity! but it overflows with n = 300 unlike the first solution
Awesome!!!
May be after converting string to char array null-terminate '\0' is absent at the end of char array
We programmers know our kind too well
Should I provide the code as well? I will provide the byte-by-byte comparison I did, just need to know if the code should be included.
This is not how you raise an issue. You need to provide clear logs, inputs, outputs... In brief, you must prove there is an issue, not make blur assumptions. Most issues raised are mistakes of OP.
See there: https://docs.codewars.com/training/troubleshooting/
There might be something wrong with the C++ translation. I wrote the C++ version and verified the output byte by byte to match the expected output and it did, but was rejected? I just basically converted my C++ solution into php and got a pass like that, but there might be something wrong with the C++. My solution passed all the tests but the very first hello world and the fibonacci tests, despite having the seemingly correct output.
O(1) solution. Awesome. Wish I would've figured it out. Very nice
Yes, that's logically equivalent
Amazing
(in its simplicity)
This is impressive
👀 https://rosettacode.org/wiki/Hamming_numbers#C.23
What???
Loading more items...