var pk,vk,tk,x,k:integer;
begin
write('x = ');
readln(x);
for pk:= 1 to 6 do
for vk:=1 to 6 do
for tk:=1 to 6 do
if pk+vk+tk=x then
writeln('pk = ',pk,' vk = ',vk,' tk = ',tk,' ',pk,' + ',vk,' + ',tk,' = ',pk+vk+tk);
k:=k+1
end
end;
writeln(k,' шансов')
end.
var pk,vk,tk,x,k:integer;
begin
write('x = ');
readln(x);
for pk:= 1 to 6 do
begin
for vk:=1 to 6 do
begin
for tk:=1 to 6 do
if pk+vk+tk=x then
begin
writeln('pk = ',pk,' vk = ',vk,' tk = ',tk,' ',pk,' + ',vk,' + ',tk,' = ',pk+vk+tk);
k:=k+1
end
end
end;
writeln(k,' шансов')
end.