結果
問題 | No.2600 Avator Height |
ユーザー | flygon |
提出日時 | 2024-01-12 21:25:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 178 ms / 2,000 ms |
コード長 | 490 bytes |
コンパイル時間 | 635 ms |
コンパイル使用メモリ | 81,572 KB |
実行使用メモリ | 103,752 KB |
最終ジャッジ日時 | 2024-01-12 21:25:39 |
合計ジャッジ時間 | 7,331 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 68 ms
91,696 KB |
testcase_01 | AC | 169 ms
103,752 KB |
testcase_02 | AC | 165 ms
103,752 KB |
testcase_03 | AC | 167 ms
103,752 KB |
testcase_04 | AC | 166 ms
103,752 KB |
testcase_05 | AC | 178 ms
103,752 KB |
testcase_06 | AC | 171 ms
103,752 KB |
testcase_07 | AC | 174 ms
103,752 KB |
testcase_08 | AC | 165 ms
103,752 KB |
testcase_09 | AC | 169 ms
103,752 KB |
testcase_10 | AC | 172 ms
103,752 KB |
testcase_11 | AC | 169 ms
103,752 KB |
testcase_12 | AC | 168 ms
103,752 KB |
testcase_13 | AC | 168 ms
103,752 KB |
testcase_14 | AC | 169 ms
103,752 KB |
testcase_15 | AC | 164 ms
103,752 KB |
testcase_16 | AC | 170 ms
103,752 KB |
testcase_17 | AC | 169 ms
103,752 KB |
testcase_18 | AC | 166 ms
103,752 KB |
testcase_19 | AC | 172 ms
103,752 KB |
testcase_20 | AC | 168 ms
103,752 KB |
testcase_21 | AC | 167 ms
103,752 KB |
testcase_22 | AC | 178 ms
103,752 KB |
testcase_23 | AC | 170 ms
103,752 KB |
testcase_24 | AC | 132 ms
103,752 KB |
testcase_25 | AC | 145 ms
103,752 KB |
ソースコード
import sys sys.setrecursionlimit(5*10**5) input = sys.stdin.readline from collections import defaultdict, deque, Counter from heapq import heappop, heappush from bisect import bisect_left, bisect_right from math import gcd mod = 998244353 rr = [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] %= mod ee[-1] %= mod q = int(input()) for i in range(q): n = int(input()) print((5*rr[n-1]**2 - ee[n-1]**2)%mod)