From 563cb2f865dcb3e10e7fe0cd3d8ca60a3e02e407 Mon Sep 17 00:00:00 2001 From: Abigail Date: Thu, 4 Nov 2021 18:12:56 +0100 Subject: Bash, bc, C, Lua, Node.js, Python and Ruby solutions for week 133, part 1. --- challenge-133/abigail/lua/ch-1.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 challenge-133/abigail/lua/ch-1.lua (limited to 'challenge-133/abigail/lua/ch-1.lua') diff --git a/challenge-133/abigail/lua/ch-1.lua b/challenge-133/abigail/lua/ch-1.lua new file mode 100644 index 0000000000..f846c84e91 --- /dev/null +++ b/challenge-133/abigail/lua/ch-1.lua @@ -0,0 +1,13 @@ +#!/opt/local/bin/lua + +-- +-- See ../README.md +-- + +-- +-- Run as: lua ch-1.lua < input-file +-- + +for num in io . lines () do + print (math . floor (math . exp (math . log (tonumber (num)) / 2))) +end -- cgit