FB(斐波那契)
题目:

公式:
开头为0,1,后面的每一项为前两项的和
思路:
根据斐波那契的值对应给的字符串的索引
s = "VERAYTRGUYTLOUYTFDRKONMLKJOPGF65DD"
list = [0, 1]
print(len(list))
flag = ""
for i in range(len(s)):
new = list[len(list) - 1] + list[len(list) - 2]
list.append(new)
print(list)
for i in list[1:]:
if i <= len(s):
flag += s[i - 1]
print(flag)
# flag{VVERYGOOD}

浙公网安备 33010602011771号