Company: Nobroker
Difficulty: medium
Question 27 Language Coding Coding 2 15 marks A field team encodes every status update into a binary digit sequence (made up of 0s and 1s) before pushing it over a radio link that is being passively monitored. Anyone listening in can only recover the total number of digits and the count of zeros and ones in the transmission - they cannot recover the actual arrangement of bits directly from the channel. An analyst monitoring the link wants to recover the transmitted content anyway. She can extract only the digit count and how many zeros and ones appear in it. Using those numbers she builds her own binary string of the same length with the same counts, then repeatedly applies a circular right shift to it, performing exactly as many shift operations as there are digits in the transmission. Write a program that reports how many of those shifts happen to reproduce the original transmitted sequence, together with the decimal value of that original sequence. Input Format The first line holds