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.
I followed the estimated rank suggestion cause I thought this kata was extremely easy
Please correct random tests - there is more than one transaction for a product_id per date
To make the description correct, I think you should replace "the current date" with "the current week"
Incomplete description!
There are situations when robot can't win.
I mean situations when the number of sticks is a multiple of 4, i.e. 4, 8, 12, etc.
At first robot takes n sticks (1 <= n <= 3), so computer takes (4-n) sticks,
making the number of remaining sticks divisible by 4 again... and again... and again...
So when we have 4 sticks remaining, robot takes n sticks again, making the number
of remaining sticks between 1 and 3, so computer takes all the remaining sticks,
and robot loses.
So if there are random cases with the number of sticks divisible by 4,
the author should specify what function should return in case robot can't win;
otherwise specify that input is a positive integer, not divisible by 4.
Thanks everyone who has read it to the end!!!
Approved Java translation by Emilio.CV
C++ translation
Approved
Approved
What's happened with Java language versions?
Your Python translation approved