Текстовый файл состоит не более чем из
Приведём решение на языке Python.
f = open('24_58329.txt').read()
count = 1
maxi = 0
for i in range(2,len(f)):
if int(f[i - 2]) + int(f[i - 1]) > int(f[i]):
count += 1
else:
count += 1
if (count > maxi):
maxi = count
count = 1
print(maxi)
Ответ: 33.
Приведём решение Игоря Дедова на языке Python.
s = open('24_58329.txt').readline()
len_st = 2
len_max = 0
for i in range(len(s) - 2):
if int(s[i]) + int(s[i+1]) > int(s[i+2]):
len_st += 1
len_max = max(len_max, len_st)
else:
len_st = 2
print(len_max)

