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.
Можно без скобок, так как приоритет * выше чем у +
Nice solution! I believe you don't need to use strings.Split(), since 0 <= x <= 4 and 0 <= y <= 4.
I never knew about that. Thanks!
totally true, but the notes in the task are:
0 <= x <= 4
0 <= y <= 4
so in this case the solution is just fine
Like @SILVERSPASE explained, this should not be best practice.
What about Sscanf()? Nobody used that: https://www.codewars.com/kata/reviews/5c759e9cb9e52600016df701/groups/5d4695f157245b0001eab486
good solution, but if there will be two digits - string comparing will return wrong result:
fmt.Println(11 > 2) // will return true - that what we need
fmt.Println("11" > "2") // oops, this will returne false, thats why we need to convert to int
same with 'Can't do 2582 EUR. Value must be divisible by 500!'
why should it be divisible by 500, it should be divisible by 5 ....
same,
2980 'EUR'
Expected: '596 * 5 EUR', instead got: '5 * 500 EUR, 2 * 200 EUR, 1 * 50 EUR, 1 * 20 EUR, 1 * 10 EUR'
and 70+ random tests fail like this ... maybe the ATM should give the lowest valued bills first, but i am not sure, that's not mentioned in the task