Skip to content

Instantly share code, notes, and snippets.

@Kanol
Created October 19, 2016 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kanol/030e40d06dad61509c12b363173ab41f to your computer and use it in GitHub Desktop.
Save Kanol/030e40d06dad61509c12b363173ab41f to your computer and use it in GitHub Desktop.
program n7;
var n, i, ed, des, sot, tis, number:integer;
begin
readln(n);
for i:=1 to n do begin
ed:=i mod 10;
des:= (i mod 100) div 10;
sot:= (i div 100) mod 10;
tis:= i div 1000;
if ed=0 then ed:=1;
if des=0 then des:=1;
if sot=0 then sot:=1;
if tis=0 then tis:=1;
if i mod ed=0 then
if i mod des=0 then
if i mod sot=0 then
if i mod tis=0 then
writeln(i);
end;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment