@creepebucket 在 OI题目求助, 为什么WA 中发帖
a, b, c = [int(x) for x in input().strip().split(' ')]
d = b - a + 1
l = [ord(x) - ord('a') - a + 1 for x in input()]
def next_num():
p = -1
while l[p] == d + p:
p -= 1
l[p] += 1
m = l[p] - p
while p != -1:
p += 1
l[p] = m + p
for i in range(5):
next_num()
print(''.join([chr(x + a - 1 + ord('a')) for x in l]))
样例是对的, 知道数字输出完之后有越界问题, 但是诡异的是, 给我...