Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Pete in love

Time limit: 2 seconds

Pete has coins of any positive integer value in unrestricted quantity. He wants to buy his girl a cake that costs n roubles. Find the number of different ways he can pay for the cake.

Input consists of an integer n < 100.

Output the number of different ways p(n).

INPUT #1

1

OTPUT #1

1

INPUT #2

2

OTPUT #2

2

INPUT #3

7

OTPUT #3

15