luogu#P5136. sequence
sequence
Background
Wolfycz really likes sequences (just kidding).
Problem Description
Wolfycz really enjoys studying sequences, and he also likes the golden ratio. One day, Wolfycz wrote down a sequence and defined . However, Wolfycz does not know the value of , so he hopes you can help him.
Note: Please pay attention to the impact of constant factors on the running time of your program.
Input Format
The first line contains , meaning there are test cases.
Then each following line contains one integer .
Output Format
Output lines in total. Each line contains one integer, representing the value of . Output the answer modulo 998244353.
5
1
9
20
50
100
2
77
15127
192911239
996781931
Hint
For of the testdata, .
For of the testdata, .
For of the testdata, .
Translated by ChatGPT 5