LUCKYSEVEN - Editorial

PROBLEM LINK:

Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4

Author & Editorialist: iceknight1093

DIFFICULTY:

TBD

PREREQUISITES:

None

PROBLEM:

Given the first 10 letters seen by Chef on a day, print the 7-th of them.

EXPLANATION:

Do exactly what is asked: take the string S as input, and print its 7-th character.
In most languages, strings are 0-indexed, so you should print s[6].

TIME COMPLEXITY

\mathcal{O}(1) per testcase.

CODE:

Author's code (Python)
s = input()
print(s[6])