diff options
Diffstat (limited to 'challenge-243/sgreen/python/ch-2.py')
| -rwxr-xr-x | challenge-243/sgreen/python/ch-2.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/challenge-243/sgreen/python/ch-2.py b/challenge-243/sgreen/python/ch-2.py new file mode 100755 index 0000000000..5a3f723c7c --- /dev/null +++ b/challenge-243/sgreen/python/ch-2.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import math +import sys + + +def main(ints): + solution = sum(math.floor(i / j) for i in ints for j in ints) + print(solution) + + +if __name__ == '__main__': + # Convert input into integers + array = [int(n) for n in sys.argv[1:]] + main(array) |
