Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #20974
- import random
- def f(n):
- return (n + 2 - (n % 2))
- def g(n):
- return ((n // 2 + 1) * 2)
- def t(n):
- return (n + ((n + 1) % 2) * 2 + n % 2)
- def p(n):
- return (((n + 1) // 2 + (n + 1) % 2) * 2)
- def h(n):
- return ((n + 2) // 2 * 2)
- z = 0
- for i in range(1000000):
- k = int(random.randint(0, 10000000))
- c = f(k), g(k), t(k), p(k), h(k)
- if not any(c):
- print(c)
- print('something wrong i can feel it')
- z += 1
- #elif (f(k) == g(k) == t(k) == p(k) == h(k)):
- # print('look here, those numbers are the same\n', c)
- print('Сбоев ровно', z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement