Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import product
- cnt = 0
- for i in product((0,1,2,3,4,5,6), repeat=6):
- if sum(i)%2 == 0:
- cnt += 1
- print(cnt)
- #print(int('666666', 7))
- #0......117648 --- 117649 чисел всего
- # начинается на 0, значит четных больше
- print(117649//2+1)
Advertisement
Add Comment
Please, Sign In to add comment