PTT
Submit
Submit
选择语言
正體中文
简体中文
PTT
Programming
Re: [问题] 1-9位数不重复印出来 (Python)
楼主:
suhorng
( )
2016-12-03 11:08:32
既然 Python 那当然是要作弊啊
#!/usr/bin/env python3
import itertools
import sys
print(', '.join("".join(xs) for i in range(1,int(sys.argv[1])+1) \
for xs in itertools.permutations("0123456789", i) \
if xs[0]!='0'))
继续阅读
Re: [问题] 1-9位数不重复印出来 (Python)
penguin7272
[问题] 请教适合入门的算法书
benasking712
Re: [问题] 1-9位数不重复印出来 (R)
kilfu0701
Re: [问题] 1-9位数不重复印出来 (C)
lc85301
Re: [问题] 1-9位数不重复印出来 (Scala)
Chikei
Re: [问题] 1-9位数不重复印出来 (Text)
CindyLinz
Re: [问题] 1-9位数不重复印出来 (Haskell (2))
suhorng
Re: [问题] 1-9位数不重复印出来 (8th)
enthos
Re: [问题] 1-9位数不重复印出来 (Crystal)
firejox
Re: [问题] 1-9位数不重复印出来 (JavaScript)
storyn26383
Links
booklink
Contact Us: admin [ a t ] ucptt.com