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.
maybe he use 9.8 because te test is using an iterative algorithm, the problem is stupid
My advice is to stop feeling dissapointed and fork the translation and fix it if you want.
You should not seed anything at all.
Also, for some reason even a working solution may not pass the tests (I suspect it's the absence of seeding inside the fixture, though I can't tell for sure).
Seeding outside the loop. First line of code in the function.
Are you seeding inside or outside the loop? The former will lead to resetting the randomizer with each loop generating identical results each time.
Maybe this question can't be answered because it's too revealing, but I must ask anyway.
Coding in C++, using built-in random function and seeding with time. However, when the tests run, it gives the same password every single time. The password looks random, but it is just the same thing over and over again. Not really sure how to get around this because seeding with the time should solve this problem. Any tips?
You have used
9.8
instead of9.81
, that's the only problem with your solution.This is so stupid. Ran tests once and was "off" on one of the random tests (I wasn't off, but the answer was because of rounding).
Then I ran it again and magically worked because of different random tests.
Would 10/10 recommend deleting this challenge...waste of time to code correctly and have a coin-flip chance of being correct due to rounding. This is amateur stuff.
Not an issue.
USE A LIST INSTEAD OF INDIVIDUAL ARGUMENTS...
Ran into issue when "Attempting" in C++ 14:
main.cpp:34:9: error: use of undeclared identifier 'unordered_set'
unordered_set s = {1, n};
^
main.cpp:34:28: error: expected '(' for function-style cast or type construction
unordered_set s = {1, n};
~~~~ ^
main.cpp:38:17: error: use of undeclared identifier 's'
s.insert(x);
^
main.cpp:39:17: error: use of undeclared identifier 's'
s.insert(n / x);
^
main.cpp:41:16: error: use of undeclared identifier 's'
return s.size();
^
5 errors generated.
Issues seem to be outside my code...not sure there's anything I can do about this. Dissapointing but not necessarily surprising.
I agree! Would be a less trivial problem to solve too.