Computer Science, asked by chimalabhargavi60, 19 days ago

The cows in farmer John's herd are numbered and branded with consecutive integers from 1 to N (1 <=N<10,000000)
when the cows come to the barn for milking they always come in sequential order from 1 to N
frame Jhon who majored in mathematics in college and loves numbers often noticed that when he has exactly 15 cows in his herd there are precisely four ways that the number on any set of one or more consecutive cows can add up to 15 they are:15,7+8, 4+5+6,and 1+2+3+4+5.
when the number of cows in the head is 10,drops 2:namely 1+2+3×4 and 10.
write a complete solution that will compute the number of ways framer Jhon can sum the numbers consecutive cows to equal N.do not use precomputation to solve this problem

Answers

Answered by sharmashivang520
1

Answer:

WAIT 10 MINTUES OK PLEASE MARK AS BRAINLIEST

Similar questions