diff options
author | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2016-10-08 09:56:43 +0700 |
---|---|---|
committer | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2016-10-08 09:56:43 +0700 |
commit | 2a7bc10f6c011d19fb3b0e73068f7e1a9c30ace0 (patch) | |
tree | 95190a32ec1c7098494849eea5a5ba6b53289585 /NTU/sagain_geninp.py | |
parent | 207cc2ae9893b0cdecd20119b9ede37f73cd4a1e (diff) | |
download | cp-2a7bc10f6c011d19fb3b0e73068f7e1a9c30ace0.tar.gz |
Initial commit
Diffstat (limited to 'NTU/sagain_geninp.py')
-rwxr-xr-x | NTU/sagain_geninp.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/NTU/sagain_geninp.py b/NTU/sagain_geninp.py new file mode 100755 index 0000000..7764953 --- /dev/null +++ b/NTU/sagain_geninp.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +from random import choice, randint +from string import ascii_lowercase + + +with open('sagain.txt', 'w') as f: + length = randint(1, 2000000) + k = str(randint(1, min(length, 1000))) + '\n' + f.write(k) + for _ in range(length): + f.write(choice(ascii_lowercase)) + f.write('\n') |