GAME OF DIGITS
CodeChefOpen on judge ↗
Given a numerical string S of size N consisting of only 0 and 1 as its digits. Consider the following tasks: * Task 1: Find the minimum number of shuffles (MINSH) among digits of string S required to make the resultant string Q (after shuffle) divisible by 6\. If it is impossible to make required string Q then Task 2 is a failure and you do not need to solve Task 2. * Task 2: Find the smalles
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start