EtashGuha's picture
Add files using upload-large-folder tool
b0519d6 verified
|
raw
history blame
1.13 kB

etmx05

Problem Description

Middle Strings

Miss Roma has got a new job in a computer agency. To test her skills the manager has appointed her with a small project. She will get a string of any length but of ODD length and what she has to do is finding a center string of length 3 in the original string.

For Example: She gets a string 'CANDY' then she needs to display the output 'AND'.

You have to help her. So, develop a code which accepts a string and displays the middle string of length 3.

Strings must be submitted in UPPER CASE only. If String is of length less than 3 display output as 0.

Input First line consists of a string of ODD length which is in uppercase.

Output Second Line displays the appropriate output of length 3

Example

Input: CANDY

Output: AND

Input: SOLVING

Output: LVI

Contest Information

  • Contest ID: 0
  • Problem Index:
  • Points: 0.0
  • Rating: 0
  • Tags: None
  • Time Limit: None seconds
  • Memory Limit: 0 bytes

Task

Solve this competitive programming problem. Provide a complete solution that handles all the given constraints and edge cases.