Last time It's the 10th day.
#10 Problem 2WA ** Thoughts ** First, considering how the character string increases, the length of the character n is It will be $ n ^ 0, n ^ 1, n ^ 2, ........... n ^ {5 * 10 ^ {15}} $. Then, the last term becomes larger than the maximum value of k, so the answer is a character other than 1, which has the smallest index in the range of k. So I'm looking for elements other than 1 in for.
s = str(input())
k = int(input())
for i in range(min(len(s),k)):
if s[i] != '1':
print(s[i])
quit()
print('1')
I will do my best for the next AGC. see you
Recommended Posts