Question: Given a positive integer N and a common difference k , determine the number of arithmetic progressions consisting of integers with a common difference of
Given a positive integer N and a common difference k determine the number of arithmetic progressions consisting of integers with a common difference of k such that their sum is equal to N
Input
The only line of the input contains integers N and k
Constraints:
N QUESTION
Progression Count CodeRush January'
Time Limit: Memory Limit:
Given a positive integer and a common difference determine the number of arithmetic progressions consisting of integers with a common difference of such that their sum is
equal to
Input
The only line of the input contains integers and
Constraints:
Output
Output a single integer, the number of such arithmetic progressions consisting of integers.
Example
Input:
Output:
k
Output
Output a single integer, the number of such arithmetic progressions consisting of integers.
Example
Input:
Output:
AP's :
Input:
Output:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
