slices, return the smallest number of cuts after which the cake is divided into exactly slices identical pieces.slices=6 → 3
Three cuts through the center, 60° apart, give six equal pieces.
slices=5 → 5
An odd number of pieces cannot come from full cuts, so you need five radial cuts from the center to the edge.
slices=1 → 0
The cake is already one piece, so no cuts are needed.
slices ≤ 100slices=6
3
Run checks the first 3 tests in your browser. Submit checks all 47 tests on the server, hidden ones included.