結果

問題 No.3168 [Cherry 7th Tune D] Manhole
ユーザー 👑 Kazun
提出日時 2023-10-20 23:00:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 359 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 401 ms
コンパイル使用メモリ 82,228 KB
実行使用メモリ 87,708 KB
最終ジャッジ日時 2025-05-30 21:02:59
合計ジャッジ時間 7,724 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    A, B, C = map(int, input().split())

    Mod = 998244353
    A2 = (A * A) % Mod
    B2 = (B * B) % Mod

    return (1 + (A2 + B2) * pow(C, -2, Mod)) % Mod

#==================================================
import sys
input=sys.stdin.readline
write=sys.stdout.write

T = int(input())
write("\n".join(map(str, [solve() for _ in range(T)])))
0