Skip to content

Instantly share code, notes, and snippets.

@iv-m
Created April 18, 2018 05:57
Show Gist options
  • Save iv-m/6e3f8cadc3e4b54f68acfa120b971c02 to your computer and use it in GitHub Desktop.
Save iv-m/6e3f8cadc3e4b54f68acfa120b971c02 to your computer and use it in GitHub Desktop.
#!/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