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 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.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?