結果
| 問題 |
No.3168 [Cherry 7th Tune D] Manhole
|
| コンテスト | |
| ユーザー |
ymm-knight
|
| 提出日時 | 2025-06-17 03:50:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 176 ms / 2,000 ms |
| コード長 | 460 bytes |
| コンパイル時間 | 2,075 ms |
| コンパイル使用メモリ | 195,244 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-17 03:50:22 |
| 合計ジャッジ時間 | 7,463 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int mod = 998244353;
typedef uint32_t u32;
typedef uint64_t u64;
u32 pw(u32 x,u32 y){u32 a=1;while(y){if(y%2)a=(u64)a*x%mod;x=(u64)x*x%mod;y/=2;}return a;}
ll inv(ll x){return pw(x,mod-2);}
int main()
{
cin.tie(0) -> sync_with_stdio(false);
int t;
cin >> t;
while (t--) {
ll a, b, c;
cin >> a >> b >> c;
cout << (a*a + b*b + c*c) % mod * inv(c*c % mod) % mod << '\n';
}
}
ymm-knight