The powerful 2
All submissions for this problem are available.
The chef won a duet singing award at Techsurge & Mridang 2012. From that time he is obsessed with the number 2.
He just started calculating the powers of two. And adding the digits of the results.
But he got puzzled after a few calculations. So gave you the job to generate the solutions to 2^n and find their sum of digits.
N : number of inputs N<=100
then N lines with input T<=2000
The output for the corresponding input T
Input: 3 5 10 4 Output: 5 7 7 Explanation: 2^5=32 3+2=5 2^10=1024 1+0+2+4=7 2^4=16 1+6=7
|Time Limit:||0.142 sec|
|Source Limit:||5000 Bytes|
|Languages:||C, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, 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