<PREV Problem:
NEXT>
Solved by 1527 users: ...
UserDateAttemptTimeCMSC
barlukov09 dec 2009Kylix200.0122 
VBart31 may 2010Python900.0942 
xtender11 apr 2010Perl300.0843 
karthiekc22 mar 2010Ruby400.0247 
lacrosse25 apr 2013Ruby1000.0347 
baa196418 jan 2012Python500.1248 
lacrosse25 apr 2013Ruby900.0250 
david_it2112 apr 2008Ruby500.0950 
El04 mar 2008Python100.1150 
lacrosse25 apr 2013Ruby800.0251 
lodin18 sep 2006Perl300.0851 
Nakilon08 jan 2010Ruby400.0851 
david_it2112 apr 2008Ruby100.0951 
Nakilon08 jan 2010Ruby600.0852 
Nakilon08 jan 2010Ruby500.0853 
Nakilon08 jan 2010Ruby700.0853 
Languages
C++
737
FPC
332
C
305
Java
72
Kylix
59
Ruby
18
Python
16
Perl
6
Scheme
4
Lua
3
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Number of solutions

Time limit = 5 seconds

Find the number of solutions of the equation

x1 + 2x2 + 3x3+ 4x4= n,     n and xi — nonnegative integers.

Input is integer n < 1000.

SAMPLE INPUT:
3
SAMPLE OUTPUT:
3

SAMPLE INPUT:
10
SAMPLE OUTPUT:
23

Autors:
Voroztsov Artem

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


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

SW soft NIX
ID = 18.207.106.142