+ 1
[Challenge] Cube the same result solver!
Yes guys, it's time for challenge. So lets begin! You have input of array with n numbers. each number will be from 1 to 6 (cube possible result). Desired output is minimum number of moves to get the same result on every cube (1 1 1 1 or 4 4 4, ...). By move I mean change the cube wall with the result to wall close by. Every number have opposite wall, which need 2 moves to get there. So 1 is opposite to 6, 2 opposite to 5 and 3 to 4. Let's get to the work! Good luck
2 odpowiedzi
+ 8
Here is my try
https://code.sololearn.com/ch07C3e488uB/#py
0
yes it's dice. You throw 4 dice and you want the same value on them. the value can be anything. matters only that it needs to be the smallest number of move to get that result