結果
問題 | No.2467 Sum of Product of Binomial Coefficients |
ユーザー | 👑 SPD_9X2 |
提出日時 | 2023-09-06 05:11:31 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 351 ms / 2,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 81,884 KB |
実行使用メモリ | 76,536 KB |
最終ジャッジ日時 | 2024-06-29 13:48:26 |
合計ジャッジ時間 | 2,443 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 10 |
ソースコード
mod = 998244353 TT = int(input()) assert 1 <= TT <= 10**5 Ksum = 0 for lp in range(TT): N,K = map(int,input().split()) assert 0 <= N <= 10**9 assert 1 <= K <= 200000 Ksum += K ans = 0 for i in range(1,K+1): ans += pow(i+1,N,mod) ans %= mod print (ans % mod) assert Ksum <= 200000