← Back to List

18412번: 文字列の反転 (Inversion of a String) ↗

Solutions

Python 3
162 B | 162 chars
n,a,b = map(int,input().split())
s = input()
for i in range(a-1): print(end=s[i])
for i in range(b-1,a-2,-1): print(end=s[i])
for i in range(b,n): print(end=s[i])