Time limit
1000 ms
Memory limit
262144 kB
Source
Codeforces Round #257 (Div. 2)
Tags
implementation math *1300
Editorial
Announcement Tutorial (en)
Descriptions:

Jzzhu and Sequences

CodeForces - 450B