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.
@hobovsky
I have defined that operator for my type and it still does not work.
Edit: it did not work because I had other mistakes in my code (mainly to do with const qualifiers of functions). Once my code started working I removed the operator<< definition and started getting errors connected it. Thank you for the suggestion.
You need to define
operator <<
for your type. Otherwise, testing framework cannot stringify it to build an assertion message.The same problem. My solution works locally using Cygwin Clang 8.0.1 but raises a similar error here.
This comment is hidden because it contains spoiler information about the solution
Thanks. My algorithm was ok, but I used
int
as initial value in std::accumulate() insted of1ull
- unsigned long long.This comment is hidden because it contains spoiler information about the solution
1170050802 / 5262 is not an integer (and 27115 / 5262 isn't reducible) , so that can't be the lcm.
Hello,
I went through all the tests, but I got stuck in one.
(27115,5262)(87546,11111111)(43216,255689)
Expected: equal to (77033412951888085,14949283383840498)(117787497858828,14949283383840498)(2526695441399712,14949283383840498) Actual: (6029237170,1170050802)(9192330,1170050802)(197756416,1170050802)
I tried using my solution and also c++ std::lcm() to calculate and still got the same lcm = 1170050802 not 14949283383840498 like in the test.
Can someone please help me understand this result?