結果
| 問題 | No.2816 At Most Two Moves |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-19 23:04:24 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 283 bytes |
| 記録 | |
| コンパイル時間 | 118 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 300,012 KB |
| 最終ジャッジ日時 | 2026-04-02 18:49:21 |
| 合計ジャッジ時間 | 7,664 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 TLE * 2 -- * 20 |
ソースコード
mod = 998244353 for _ in range(int(input())): N = int(input()) if N == 1: print(1) continue ans = 0 ans += (N + 1) * pow(2, N * (N - 1) // 2 - 1, mod) ans += pow(2, N * (N - 1) // 2 - (2 * N - 3)) * (N - 1) * (pow(4, N - 2, mod) - pow(3, N - 2, mod)) ans %= mod print(ans)