All submissions for this problem are available.
Raavan abducted sita in the past, at that time when Ram went to save her wife , he was posed a question by Raavan in binomial theorem :
given N Ram has to find the number of odd coefficients in the expansion of (1+x)n . As the number given by Raavan was huge, Ram was unable to calculate at that time , so he was forced to save sita through war which resulted in loss of huge troop of monkeys and humans. Now you are given a time machine to travel back to that age. can you solve the question posed by Raavan and avoid the war and save many lives including Raavan.
one line consisting of a number N .
single line denoting your answer to Raavan.
- 1 ≤ N ≤ 10000000
Input: 3 Output: 4
The coefficients for binomial expansion of (1+x)3 are 1 3 3 1, out of which all are odd ,so answer is 4.
|Time Limit:||0.001 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.