-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
-
Read the user input the same way as in the previous stage; -
Get all possible triads from the string. For each of them, count the number of 0 and 1 that follow them; -
Output the result in the following format: triad: {counts_of_0}, {counts_of_1}, for example, 000: 57,12. Print the result for each triad on a new line. The triads must be ordered in ascending order of their decimal representation — for example, 110 in binary equals 1⋅4+1⋅2+0⋅1=61\cdot4+1\cdot2+0\cdot1 = 61⋅4+1⋅2+0⋅1=6 in decimal.
Metadata
Metadata
Assignees
Labels
No labels