TERMN - N-th Term
Find the n-th term of the sequence 1, 4, 16, 36, 100, ...
First Line : T (No. of test cases < 1000)
T Lines each containing a value of n (n < 100000)
Exactly T lines each containing n-th term of the sequence.
Hmm, got AC finally...
Difficult problem that need big numbers in c :(
How can it be done in C? What is the modulo?
Please correct me if my sequence is wrong!
I did it in C
I got the series and my source code is only 19 lines long....still showing memory error, my code works fast till n=1000000 and yet memory error, memory limit of 300B is too much
for n = 6
@Pranjal Successena: Your comment is unfortunately nonsense. Actually for these types of problems there are an infinite number of valid sequences with a "simple" formula when given the first n terms, for n arbitrary large. Just look up interpolating polynomial. And that's why it is in riddle section. There are a handful of somewhat similar problems that I consider "grandfathered in" and have been allowed to stay in classical or challenge (with some discussion): SUMUP, EASYPROB, EPROBLEM, HARDP, and maybe more that I don't know about or can't think of at the moment.
this is an incomplete problem...
Can I have a big test case