Advertisement
Uwwan

#20974

Mar 10th, 2022
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #20974
  2. import random
  3. def f(n):
  4. return (n + 2 - (n % 2))
  5. def g(n):
  6. return ((n // 2 + 1) * 2)
  7. def t(n):
  8. return (n + ((n + 1) % 2) * 2 + n % 2)
  9. def p(n):
  10. return (((n + 1) // 2 + (n + 1) % 2) * 2)
  11. def h(n):
  12. return ((n + 2) // 2 * 2)
  13. z = 0
  14. for i in range(1000000):
  15. k = int(random.randint(0, 10000000))
  16. c = f(k), g(k), t(k), p(k), h(k)
  17. if not any(c):
  18. print(c)
  19. print('something wrong i can feel it')
  20. z += 1
  21. #elif (f(k) == g(k) == t(k) == p(k) == h(k)):
  22. # print('look here, those numbers are the same\n', c)
  23. print('Сбоев ровно', z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement