Computer Science, asked by namna14375mj, 9 months ago

given a range [low,high] (both inclusive) , select k number from range (a number can be chosen multiple times ) such that sum those k numbers is even calculate the number of all such permutations As this number can be large

Answers

Answered by agnicseaboys
4

Answer:

def working():

   r1,r2=map(int,input().split())

   combo=int(input())

   lst=[i for i in range(r1,r2+1)]

   print(lst)

   a=len(lst)

   res=(a**combo)//2

   print(res%100000009)

working()

even odd problem

Explanation:

list contains the range of numbers

find total possible pairs based on (combo)[ways]

divide by 2 to get even sum numbers

Similar questions