PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: nikhil_010309
Tester: raysh07
Editorialist: iceknight1093
DIFFICULTY:
TBD
PREREQUISITES:
None
PROBLEM:
Given a string S, print its first, third and fifth characters.
EXPLANATION:
Print the required characters, i.e. S_1, S_3, S_5 if using 1-indexing or S_0, S_2, S_4 under 0-indexing.
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (PyPy3)
s = input()
print(s[0], s[2], s[4], sep='')