ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Строки > задача:


50429 - Secret Message

Гость
• Вопросы к жюри (1)

Задачи раздела

• 50258 - String manipulations
• 50264 - String Multiplication
• 50307 - Palindromes
• 50315 - Pig Latin
• 50484 - Number Of Letters
• 50323 - Filtering Contact List
• 50409 - Random Password Generator
• 50763 - Valid Password
• 50429 - Secret Message
• 50511 - Class Average
• 50502 - Welcome Andi - 1
• 50503 - Welcome Andi - 2
• 50926 - School Mail Merge
• 50764 - Fast Typing Competition
• 50533 - Contacts List
• 50555 - Frekuenca e karaktereve
• 50596 - Udhetimi juaj eshte ketu

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Halil Karimis.

Secret Message

Question: There are two friends who want to send short secret messages to each other. They found a special coding system which can be solved only by these two boys.

The system: There is a string of characters. There is a special role of "*" sign which removes the previous letter in the string, k "*" signs remove k previous letters.

Solution: There are two strings 'E' and 'D'.'E' is the given encrypted text line. The program should check 'E' so that if next element of 'E' is not '*' then writes the element into decrypted 'D', if not than remove the last element of 'E' without adding the '*' sign.

Input specification
There is one line of text which can contain any letters and symbols. Maximum length of text can be 255 characters.

Output specification
Print the secret message without any '*' characters.

 Sample Input I     Sample Input II   
 mx*erw*ho*abe*a
 lok*okl* u*ay*t t*tho*p*e e*sku*y
 Sample Output I     Sample Output II   
 merhaba
 look at the sky


Для отправки решений необходимо выполнить вход.

www.contester.ru