repl.it
@anonymous/

AchingEnchantedHack

Lua

No description

fork
loading
Files
  • main.lua
main.lua
1
2
3
4
5
6
s = io.read()
for i=s,1,-1 do
  d1 = tostring(i).sub(i,1,1)
  d3 = tostring(i).sub(i,3,3)
  if d1 == d3 then print(i) print(s-i) break end
end
?