Created
October 26, 2010 19:25
-
-
Save sayz/647594 to your computer and use it in GitHub Desktop.
satır ve sütünların toplamı 15 olacak
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
for i in (123..987) | |
myi = i.to_s.split(//) | |
for k in (0..2) | |
if myi[k].to_i != 0 | |
if myi[1+k].to_i != 0 | |
if myi[2+k].to_i != 0 | |
if myi[k].to_i != myi[1+k].to_i | |
if myi[k].to_i != myi[2+k].to_i | |
if myi[1+k].to_i != myi[2+k].to_i | |
if (myi[k].to_i + myi[1+k].to_i + myi[2+k].to_i) == 15 | |
puts i.to_s | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment