Created
October 19, 2016 18:13
-
-
Save Kanol/030e40d06dad61509c12b363173ab41f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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