Minimum Digit Deletion
CodeChefOpen on judge ↗
Description There are two integers N and K , where K is 2i i={0,1,2,3,...}. You are allowed to delete any number of digits from N. You can perform the deletion at most |N|-1 number of times. Your task is to find minimum number of deletions required such that resulting N is divisible by k or report -1 if it is impossible. Input Format First line of input contains T denoting number of test cases.
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