Здравейте, опитвам да реша две от задачите, но зациклих сериозно. Всякакви насоки са добре дошли. Поздрави!
One day a signal from space was registered. Scientists managed to record the signal as a sequence of
N symbols. It turned out that due to a technical difficulty some symbols have been repeated. Help the scientists by writing a program which removes consecutive repetitions of symbols, decoding the message.
Input data is read from the standard input
- On the only input line, a message is given
Print to the standard output
- Print the decoded message
- The length of the message will be no more than
- Message consists of digits and Latin letters (upper and lower case)
Ivancho considers a number to be “good”, if it can be divided by each of its digits.
- 13 is not “good”, because it cannot be divided by 3;
- 36 is “good”, because it can be divided both by 3 and 6;
- 102 is “good” - can be divided by 1 and by 2;
- 103 is not “good” - cannot be divided by 3;
Help Ivancho by writing a program, which counts the “good” numbers between number A and number B (inclusive).
Read from the standard input the numbers A and B received on one line, separated by space.
Print to the standard output the count of “good” numbers.
- 1 <= A <= B <= 100000
Explanation - between 1 and 10 there are 10 “good” numbers