- local count = 0
- local mode = 5
- function go(index,str,jk)
- str = str ..(jk==0 and "" or jk)
- if index <= 0 then
- if string.sub(str,3,3) ~= "3" then
- count = count + 1
- print(str)
- end
- return
- end
- for i = 1,mode do
- if not string.find(str,i) and jk+i~=6 then
- go(index-1,str,i)
- end
- end
- end
- go(5,"",0)
- print(count)