PARCARD1 - Partition function (EASY)

no tags 

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

hide comments
julkas: 2018-04-29 13:54:00

@mikhaelkh Good problem.

[Rampage] Blue.Mary: 2017-02-11 17:17:54

With updated Pike compiler ver 8.0 my old code get AC.

MaHmOuD.: 2015-02-13 14:21:36

Can someone explain what (with order irrelevant) does mean?
thanks in advance.

(Francky)=>
1 + 2 = 2 + 1 are both the same sum equal to 3 (with order irrelevant).
1 + 2 + 2 = 2 + 1 + 2 are both the same sum equal to 5 (with order irrelevant). But 1+4 is another sum.

Last edit: 2015-02-13 20:40:48
sarelfeniel: 2014-06-28 02:38:28

Fun. Python is slow :(

Miguel Oliveira: 2013-08-02 11:54:44

trunganh, i don't know what language you use, but the output is less than 1mb. even python outputs it in less than 1sec easily

trunganh: 2013-08-01 18:53:26

Sorry for a dump question, I wonder that only displaying 10,000 numbers should take more than one second so how can others get accept within 1 second ? Sorry if I misunderstand something.

Last edit: 2013-08-01 19:30:48
BISMITH BLAC: 2013-07-28 04:04:52

for 1 is it 0 or 1 ?

utpal kumar jha: 2013-07-27 11:57:47

any one plzz explain the output format i m unable to understand

Vikas Kushwaha: 2013-07-27 11:04:04

good one :)

Pranay: 2013-07-04 09:14:37

nice :)

Last edit: 2013-06-27 12:16:02

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