e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Week 6: December 14 - 20. Char arrays 1

Slicing 3

The string s is given. Perform a set of the next operations with it.

Input data

One string s containing more than 10 characters. Indexation starts from 1.

Output

In separate lines print the answers to the following queries:

  • Word that is formed with the second, fourth and tenth character of the string s.

  • Word that is formed with the first, second and last character of the string s.

  • Word that is formed with the last five characters of the string s.

  • String s without the last four characters.

  • A word formed with all characters with even indexes.

  • The length of the word from the previous query.

  • All odd characters of the string s in the reverse order, starting with the last.

Time limit 1 second
Memory limit 128 MiB
Input example #1
abrakadabra
Output example #1
bar
aba
dabra
abrakad
arkdba
6
abdkra
Author Matviychuk Sergiy Volodymyrovych
Source "ABC programming"