PARCARD1 - Partition function (EASY)

You need to output the number of distinct ways of representing n as a sum of natural numbers (with order irrelevant) for all integer n from 0 to 10000 inclusive.

First numbers of output must be:

1 1 2 3 5 7 11 15 22 30 42 56 77

Added by:Michael Kharitonov
Date:2013-06-24
Time limit:1s
Source limit:10000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2013-07-04 09:14:37 albertg
What's the answer for 10000?
--ans--> Use WolframAlpha.

Last edit: 2013-06-26 07:40:03
2013-07-04 09:14:37 [Lakshman]
What is the output format as shown above?,
or \n after each value . I am getting NZCE. Please help.
I am not good at PYTHON.
--ans--> You can separate integers using ' ' or '\n', it doesn't matter. You have a stupid mistake.

EDIT: AC Thanks

Last edit: 2013-06-26 17:38:42
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.