結果
問題 | No.2600 Avator Height |
ユーザー |
|
提出日時 | 2024-01-12 21:25:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 193 ms / 2,000 ms |
コード長 | 490 bytes |
コンパイル時間 | 377 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 104,480 KB |
最終ジャッジ日時 | 2024-09-27 21:05:51 |
合計ジャッジ時間 | 8,033 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
import syssys.setrecursionlimit(5*10**5)input = sys.stdin.readlinefrom collections import defaultdict, deque, Counterfrom heapq import heappop, heappushfrom bisect import bisect_left, bisect_rightfrom math import gcdmod = 998244353rr = [1,1]ee = [1,3]for i in range(2*10**5+100):rr.append(rr[-1] + rr[-2])ee.append(ee[-1] + ee[-2])rr[-1] %= modee[-1] %= modq = int(input())for i in range(q):n = int(input())print((5*rr[n-1]**2 - ee[n-1]**2)%mod)