Skip to content

Commit 9baef80

Browse files
committed
11.30 solve 0001
1 parent 7a0c23f commit 9baef80

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Forec/0001/0001.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# coding = utf-8
2+
__author__ = 'forec'
3+
import random
4+
5+
def make_number( num, length ):
6+
str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
7+
b = set()
8+
i = 0
9+
while i < num:
10+
ans = ''
11+
for j in range(length):
12+
ans += random.choice(str)
13+
if ans not in b:
14+
b |= {ans}
15+
i += 1
16+
print(ans)
17+
18+
make_number( 200, 10)

0 commit comments

Comments
 (0)