A Test of Series
All submissions for this problem are available.
A Mathematics professor walked into her class. She wanted to test her students’ abilities and hence, gave them a series:
And asked them to predict the number at a given position.
Write a program to do exactly that. Your task is to take numbers as input (one per line), and print the corresponding number in the inputted position.
Note: 0 Terminates the program.
No generated number in excess of 1000 digits will be in the test data, i.e.
Func(25) = 75025 has 5 digits.
Input: 5 99 0 Output: 5 218922995834555169026
Note : The reference for this problem has been taken from : UVa online Judge
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, 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, CLOJ, FS|
Fetching successful submissions