結果
| 問題 | No.2816 At Most Two Moves |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-19 23:04:24 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 283 bytes |
| 記録 | |
| コンパイル時間 | 243 ms |
| コンパイル使用メモリ | 96,104 KB |
| 実行使用メモリ | 303,744 KB |
| 最終ジャッジ日時 | 2026-08-19 03:53:08 |
| 合計ジャッジ時間 | 8,614 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)