Created
April 18, 2018 05:57
-
-
Save iv-m/6e3f8cadc3e4b54f68acfa120b971c02 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
#!/usr/bin/env python | |
more = 0 | |
less = 0 | |
for n in range(100, 1000): | |
a = n / 100 | |
b = n % 100 / 10 | |
c = n % 10 | |
if a > b > c: | |
more += 1 | |
elif a < b < c: | |
less += 1 | |
print(more, less) | |
print(more - less) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment