看板 Programming 關於我們 聯絡資訊
awk 'BEGIN { printf "請輸入數字:"; getline num < "-"; \ for(n=1;n<=10**num-1;n++) { s=""; split(n,a,""); for(i in a) if(match(s,a[i])) break; else s=s a[i]; \ if(s==n) print n } }' -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.162.185.242 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Programming/M.1646154198.A.ABD.html ※ 編輯: VElysian (1.162.185.242 臺灣), 03/02/2022 01:07:08