<PREV Problem:
NEXT>
Solved by 1153 users: ...
UserDateAttemptTimeCMSC
xtender20 apr 2010Perl1800.103 
V.A.KeRneL13 nov 2006Ruby300.0112 
karthiekc22 mar 2010Ruby1100.0247 
karthiekc22 mar 2010Ruby1000.0251 
iezahel21 jul 2006Ruby100.0258 
shyrik04 dec 2007FPC200.0163 
shyrik04 dec 2007FPC300.0163 
gorlum016 mar 2011Ruby200.0363 
zhuojie26 oct 2009Python100.0763 
gchebanov21 nov 2010Python100.1163 
090104013211 apr 2013Lua100.0264 
shyrik04 dec 2007Kylix100.0165 
toshiba207 nov 2006FPC600.0165 
Languages
C++
521
FPC
310
C
215
Java
50
Kylix
50
Ruby
11
Python
7
Lua
3
Scheme
3
Perl
3
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

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

Autors:
Voroztsov Artem

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 200ms

SW soft NIX
ID = 3.233.215.196