Number of Different Ways…
Time Limit: 1 sec
The Problem
In this problem you are given an integer N. By using positive integers, how many different ways can you make a sum that is equal to N?
For example for 6 you could use:
3 + 1 + 1 + 1 = 6
4 + 2 = 6
1 + 2 + 3 = 6
3 + 3 = 6
2 + 1 + 1 + 1 + 1 = 6
. . .
Etc.
(Consider 4 + 2 to be the same as 2 + 4)
The Input
There are several lines of input in the input file. Each line contains an integer N (1<=n<=100). Input is terminated by EOF.
The Output
For each line of input you have to print a line of output, this line contains an integer M, where M is the number of different ways.
Sample Input
2
6
Sample Output
1
10
Online Mock Contest 2016
Problem Setter: Md. Helal Uddin