aboutsummaryrefslogtreecommitdiff
path: root/challenge-113/stuart-little/lua/ch-1.lua
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-113/stuart-little/lua/ch-1.lua')
-rwxr-xr-xchallenge-113/stuart-little/lua/ch-1.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/challenge-113/stuart-little/lua/ch-1.lua b/challenge-113/stuart-little/lua/ch-1.lua
new file mode 100755
index 0000000000..ab387200c5
--- /dev/null
+++ b/challenge-113/stuart-little/lua/ch-1.lua
@@ -0,0 +1,16 @@
+#!/usr/bin/env lua
+
+-- run <script> <number> <digit>
+
+if (arg[1]:find(arg[2]) or tonumber(arg[1]) >= 100 or tonumber(arg[2]) ~= 0 and tonumber(arg[1]) >= 11 * arg[2]) then
+ print(1)
+ os.exit()
+end
+for i = 0,10 do
+ dff = arg[1]-i*arg[2]
+ if (dff % 10 == 0 and dff >= 0) then
+ print(1)
+ os.exit()
+ end
+end
+print(0)