Решение демоверсии ЕГЭ по информатике 2026. Полный разбор демоверсии ЕГЭ 2026 по информатике. Демоверсия ЕГЭ по информатике 2026
источник: https://informatikaexpert.ru/
Демоверсия ЕГЭ 2026 по информатике с ответами
Решение демоверсии ЕГЭ по информатике 2026.
1. Ответ: 52

37+15=52
2. Ответ: zyxw
print('w x y z')
for w in range(2):
for x in range(2):
for y in range(2):
for z in range(2):
if ((x or y) and (not(y==z)) and (not w)) == 1:
print(w, x, y, z)
w x y z
0 0 1 0
0 1 0 1
0 1 1 0

3. Ответ: 133228

4. Ответ: 26
for n in range(1, 1000):
b = bin(n)[2:]
if n%3 == 0:
b = b + b[-3:]
else:
b = b + bin((n%3)*3)[2:]
r = int(b, 2)
if r>200:
print(n)
break
5. Ответ: 251
from turtle import *
tracer(0)
left(90)
k = 20
screensize(2000, 2000)
for i in range(2):
forward(20 * k)
left(270)
forward(12*k)
right(90)
penup()
forward(9 * k)
right(90)
forward(7 * k)
left(90)
pendown()
for i in range(2):
forward(13 * k)
right(90)
forward(6*k)
right(90)
penup()
for x in range(-30,30):
for y in range(-30, 30):
goto(x*k,y*k)
dot(3,'red')
done()
print(13*15+7*8)

7. Ответ: 245
print(35*2*3.5)
8. Ответ: 5058
from itertools import *
n = 0
for i in product("АКОРСТ", repeat=5):
n +=1
a = ''.join(i)
if n%2==0 and a[0] not in 'АСТ' and a.count('О')==2:
print(n)
…
5054
5056
5058
9. Ответ: 901

10. Ответ: 13


13-0=13
11. Ответ: 257
print((11 * 1024 * 1024 * 1024) / 3845627) #3072 print(3072 * 8 / 2732) # 8 бит print(2**8+1) #257
12. Ответ: 999

13. Ответ: 191191255254
from ipaddress import*
net = ip_network('191.128.66.83/255.192.0.0', 0)
print(net[-2])
191.191.255.254
14.
вариант 1 — Ответ: 3367
a = 2*2187**2020 + 729**2021 - 2*243**2022 + 81**2023 - 2*27**2024 - 6561
k = 0
while a>0:
if a % 27 > 9:
k = k + 1
a = a // 27
print(k)
вариант 2 — Ответ: 3319197720
from string import *
for x in printable[:29]:
a = int(f'923{x}874',29) + int(f'524{x}6152',29)
if a % 28 == 0:
print(x, a // 28)
d 3318831885
r 3319197720
вариант 3 — Ответ: 2992
for x in range(3000, 0, -1):
a = 9*11**210+8*11**150-x
k=0
while a>0:
if a%11==0:
k+=1
a=a//11
if k==60:
print(x)
break
15. Ответ: 24
p = list(range(25, 65))
q = list(range(40, 115))
a=[]
for x in range(1, 200):
if ((x in p) <= (((x in q) and (x not in a)) <= (x not in p))) == False:
a.append(x)
print(a[-1]-a[0])
16. Ответ: 15588
from functools import*
@lru_cache(None)
def g(n):
if n < 10: return 2 * n
return g(n - 2) + 1
def f(n):
return 2 * (g(n - 3) + 8)
for i in range(1, 16000): f(i)
print(f(15548))
17. Ответ: 150 9930
a = [int(x) for x in open('ege-inf-demo2026-q17.txt')]
m = min([x for x in a if 10<=x<100])
answer = []
for x, y in zip(a, a[1:]):
if (10<=x<100) + (10<=y<100) == 1 and (x + y) % m == 0:
answer.append(x + y)
print(len(answer), max(answer))
18. Ответ: 2362 1205


19-21.
def f(s,m):
if s <= 30: return m%2==0
if m==0: return 0
h = [f(s-3,m-1), f(s-5,m-1), f(s//4,m-1)]
return any(h) if (m-1)%2==0 else all(h)
print('19)' , [s for s in range(31,1000) if f(s, 2) ])
print('20)' , [s for s in range(31,1000) if not f(s, 1) and f(s, 3)])
print('21)' , [s for s in range(31,1000) if not f(s, 2) and f(s, 4)])
19) [124, 125, 126]
20) [127, 128, 129, 130, 131, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507]
21) [132, 133, 134, 508, 509, 510]
22. Ответ: 12

23. Ответ: 68
def f(x, y):
if x < y or x==7:
return 0
if x == y:
return 1
if x > y:
return f(x-1, y) + f(x-4, y) + f(x//3, y)
print(f(19, 13) * f(13, 2))
24. Ответ: 2981
s = open('ege-inf-osnovnayavolna-110625-q24.txt').readline()
l=m=ky=k2=0
for r in range(len(s)):
if s[r]=='Y': ky+=1
if r>=3 and s[r-3]+s[r-2]+s[r-1]+s[r]=='2025': k2+=1
while ky>80:
if s[l]=='Y': ky-=1
if s[l]+s[l+1]+s[l+2]+s[l+3]=='2025': k2-=1
l+=1
k=0
if ky==80 and k2>=90: m= max(m, r-l+1)
print(m)
ИЛИ
s = open('ege-inf-osnovnayavolna-110625-q24.txt').readline()
m=0
for l in range(len(s)):
for r in range(l+m, len(s)+1):
c = s[l:r]
if c.count('Y')>80: break
if c.count('Y')==80 and c.count('2025')>=90: m = max(m, len(c))
#if l%100000==0: print(l, len(s), m)
print(m)
25.
вариант 1 —
def div(x):
d =set()
for i in range(2, int(x**0.5)+1):
if x%i==0:
d.add(i)
d.add(x//i)
return sorted(d)
k=0
for x in range(800_001, 801_000):
if k==5: break
d = div(x)
if len(d)>0:
M = min(d)+max(d)
if M%10==4:
k+=1
print(x, M)
800004 400004
800009 114294
800013 266674
800024 400014
800033 61554
вариант 2 —
from fnmatch import *
for x in range(0, 10**10, 1917):
if fnmatch(str(x), '3?12?14*5'):
print(x, x//1917)
351261495 183235
3212614035 1675855
3412614645 1780185
3712414275 1936575
3912414885 2040905
26. Ответ: 564 444

27. Ответ:
38471 61225
142058 25299
для файла А
from math import dist
f = open('ege-inf-demo2023-z27_A.txt')
data = []
for s in f:
x,y = [float(d) for d in s.split()]
data.append([x,y])
clusters = []
while data:
cl = [data.pop()]
for p in cl:
sosed = [p1 for p1 in data if dist(p,p1) < 1]
for p1 in sosed:
cl.append(p1)
data.remove(p1)
clusters.append(cl)
print([len(cl) for cl in clusters])
def centroid(cl):
m = []
for p in cl:
s = 0
for p1 in cl:
s += dist(p,p1)
m.append([s,p])
return min(m)[1]
cen = [centroid(cl) for cl in clusters]
px = min(x for x,y in cen)
py = min(y for x,y in cen)
print(int(px*10000), int(py*10000))
[131, 92]
38471 61225
для файла Б
from math import dist
f = open('ege-inf-demo2023-z27_B.txt')
data = []
for s in f:
x,y = [float(d) for d in s.split()]
data.append([x,y])
clusters = []
while data:
cl = [data.pop()]
for p in cl:
sosed = [p1 for p1 in data if dist(p,p1) < 2]
for p1 in sosed:
cl.append(p1)
data.remove(p1)
clusters.append(cl)
clusters = [cl for cl in clusters if len(cl) > 20]
print([len(cl) for cl in clusters])
def centroid(cl):
m = []
for p in cl:
s = 0
for p1 in cl:
s += dist(p,p1)
m.append([s,p])
return min(m)[1]
cen = [centroid(cl) for cl in clusters]
q1 = dist(cen[1], cen[2])
def max_ras(cl):
cen = centroid(cl)
return max(dist(cen, p) for p in cl)
q2 = max(max_ras(cl) for cl in clusters)
print(int(q1*10000), int(q2*10000))
[113, 407, 100]
142058 25299
ЕГЭ ОГЭ ВПР ГВЭ МЦКО