dxnge

16

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