Re: [問題] 1-9位數不重複印出來 (Awk)

作者: VElysian (くるみ)   2022-03-02 01:03:13
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 } }'

Links booklink

Contact Us: admin [ a t ] ucptt.com