diff options
| author | Abigail <abigail@abigail.be> | 2021-11-04 18:12:56 +0100 |
|---|---|---|
| committer | Abigail <abigail@abigail.be> | 2021-11-04 20:03:53 +0100 |
| commit | 563cb2f865dcb3e10e7fe0cd3d8ca60a3e02e407 (patch) | |
| tree | f67411ffa745828f70bd96aa849a36cb7a2a1aa3 /challenge-133/abigail/python | |
| parent | 894b6aa2f49af3178b0983689f9ba81c002ca7a3 (diff) | |
| download | perlweeklychallenge-club-563cb2f865dcb3e10e7fe0cd3d8ca60a3e02e407.tar.gz perlweeklychallenge-club-563cb2f865dcb3e10e7fe0cd3d8ca60a3e02e407.tar.bz2 perlweeklychallenge-club-563cb2f865dcb3e10e7fe0cd3d8ca60a3e02e407.zip | |
Bash, bc, C, Lua, Node.js, Python and Ruby solutions for week 133, part 1.
Diffstat (limited to 'challenge-133/abigail/python')
| -rw-r--r-- | challenge-133/abigail/python/ch-1.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/challenge-133/abigail/python/ch-1.py b/challenge-133/abigail/python/ch-1.py new file mode 100644 index 0000000000..9fc7b1c3fd --- /dev/null +++ b/challenge-133/abigail/python/ch-1.py @@ -0,0 +1,15 @@ +#!/opt/local/bin/python + +# +# See ../README.md +# + +# +# Run as: python ch-1.py < input-file +# + +import fileinput +import math + +for num in fileinput . input (): + print (math . floor (math . exp (math . log (int (num)) / 2))) |
