Исправить ошибку(не выводит ответ)ребус ussr+usa=реасе var m: set of byte; u,s,r,a,p,e,c: integer; begin m : = []; for u : = 1 to 6 do if not (u in m) then begin include(m, u); for s : = 0 to 6 do if not (s in m) then begin include(m, s); for r : = 0 to 6 do if not (r in m) then begin include(m, r); for a : = 0 to 6 do if not (a in m) then begin include(m, a); for p : = 1 to 6 do if not (p in m) then begin include(m, p); for e : = 0 to 6 do if not (e in m) then begin include(m, e); for c : = 0 to 6 do if not (c in m) then begin include(m, c); if u * 1000 + s * 100 + s * 10 + r + u * 100 + s * 10 + a = p * 10000 + e * 1000 + a * 100 + c * 10 + e then writeln(u, s, s, r, ' + ', u, s, a, ' = ', p, e, a, c, e); exclude(m, c) end; exclude(m, e); end; exclude(m, p); end; exclude(m, a) end; exclude(m, r) end; exclude(m, s) end; exclude(m, u) end; end.
290
368
Ответы на вопрос:
Varm: set of byte; u,s,r,a,p,e,c: integer; beginm : = []; for u : = 1 to 6 doif not (u in m) thenbegininclude(m, u); for s : = 0 to 6 doif not (s in m) thenbegininclude(m, s); for r : = 0 to 6 doif not (r in m) thenbegininclude(m, r); for a : = 0 to 6 doif not (a in m) thenbegininclude(m, a); for p : = 1 to 6 doif not (p in m) thenbegininclude(m, p); for e : = 0 to 6 doif not (e in m) thenbegininclude(m, e); for c : = 0 to 6 doif not (c in m) thenbegininclude(m, c); if u * 1000 + s * 100 + s * 10 + r +u * 100 + s * 10 + a =p * 10000 + e * 1000 + a * 100 + c * 10 + e thenwriteln(u, s, s, r, ' + ', u, s, a, ' = ', p, e, a, c, e); exclude(m, c)end; exclude(m, e); end; exclude(m, p); end; exclude(m, a)end; exclude(m, r)end; exclude(m, s)end; exclude(m, u)end; writeln(u, s, s, r, ' + ', u, s, a, ' = ', p, e, a, c, e); end. {попробуй это}
Популярно: Информатика
-
samiraizashirin25.07.2020 14:32
-
RIF1225.08.2021 12:49
-
liza143906.10.2020 10:34
-
antonenko6201.06.2021 01:21
-
00Лисичка0028.01.2022 15:48
-
natalyasergeev125.02.2021 23:39
-
Lizka647dhsn12.05.2022 04:56
-
UliaBorodaykevi26.02.2020 09:47
-
LPKenion12.10.2020 22:36
-
aaalex0224.11.2021 11:44