Computers and Technology, 07.10.2019 21:20, dtbrooks4792
Programming challenge description: assume that someone dictates you a sequence of numbers and you need to write it down. for brevity, he dictates it as follows: first says the number of consecutive identical numbers and then says the number itself. e. g. the sequence 1 1 3 3 3 2 2 2 2 14 14 14 11 11 11 2 will be dictated as "two ones, three threes, four twos, three fourteens, three elevens, one two", so you will write down the sequence 2 1 3 3 4 2 3 14 3 11 1 2. the challenge is to write the program which compresses the given sequence using this approach. input: your program should read lines from standard input. each line is a sequence of l integers, where each integer is n, separated by a whitespace. n is in range [0, 99]. l is in range [1, 400]. output: for each test case, produce a single line of output containing a compressed sequence of numbers separated by a single space char.
Answers: 2
Chemistry, 27.06.2019 05:30, Mtovar7713
Answers: 1
Computers and Technology, 10.10.2019 03:00, sharri44
Answers: 3
Programming challenge description: assume that someone dictates you a sequence of numbers and you n...
Mathematics, 05.10.2019 10:00
Chemistry, 05.10.2019 10:00
History, 05.10.2019 10:00
Mathematics, 05.10.2019 10:00