aboutsummaryrefslogtreecommitdiff
path: root/challenge-243/sgreen/python/ch-2.py
diff options
context:
space:
mode:
authorLakpa Tashi Bhutia <lakpatashi@users.noreply.github.com>2023-11-25 21:02:55 +0530
committerGitHub <noreply@github.com>2023-11-25 21:02:55 +0530
commit6db863c3ee8cb8a3315eeae5fde99af83385aefc (patch)
tree761f0c9b8aef13375cca819d8deed4a70fff8c7e /challenge-243/sgreen/python/ch-2.py
parent9c96baeeda85997b321a4d4fbebd5fd51bffb729 (diff)
parent9a1dd9390973363a40ccda4a6d03f9f61a0ae386 (diff)
downloadperlweeklychallenge-club-6db863c3ee8cb8a3315eeae5fde99af83385aefc.tar.gz
perlweeklychallenge-club-6db863c3ee8cb8a3315eeae5fde99af83385aefc.tar.bz2
perlweeklychallenge-club-6db863c3ee8cb8a3315eeae5fde99af83385aefc.zip
Merge branch 'manwar:master' into master
Diffstat (limited to 'challenge-243/sgreen/python/ch-2.py')
-rwxr-xr-xchallenge-243/sgreen/python/ch-2.py15
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)