본문 바로가기

코딩

[Python] 백준 #27866. 문자와 문자열

https://www.acmicpc.net/problem/27866

 

27866번: 문자와 문자열

첫째 줄에 영어 소문자와 대문자로만 이루어진 단어 $S$가 주어진다. 단어의 길이는 최대 $1\,000$이다. 둘째 줄에 정수 $i$가 주어진다. ($1 \le i \le \left|S\right|$)

www.acmicpc.net

 

# 27866 - Python 3

import sys

input = sys.stdin.readline

s = str(input())
n = int(input())

print(s[n-1])