Advertisement
pb_jiang

gen2.py

Jun 15th, 2023
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #!/usr/bin/env python
  2. import sys
  3. import random
  4.  
  5.  
  6. def main():
  7.     n = random.randint(1, 1e6)
  8.     sys.stderr.write(f"begin with {n=}\n")
  9.     v = [x + 1 for x in range(n)]
  10.     random.shuffle(v)
  11.     print(n)
  12.     for x in v:
  13.         print(x)
  14.  
  15.  
  16. if __name__ == "__main__":
  17.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement