True, it's wrong, There should be no checking the inequality, because in some cases the game may not have tasks, so it will return 0.

I wrote -1, because of this reason not thinking about implementing this without inequality.

I'll fix thatwhen I come back home(21:00) :/ Now I'm a little bit late