結果

問題 No.2996 Floor Sum
ユーザー 👑 testestest
提出日時 2024-12-15 12:05:05
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 263 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 82,924 KB
実行使用メモリ 75,592 KB
最終ジャッジ日時 2024-12-20 23:30:24
合計ジャッジ時間 4,750 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 1
other AC * 2 RE * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

def scary_sum_naive(p,q,N,M,A,B):
  return sum(pow(i,p,998244353)*pow((A*i+B)//M,q,998244353) for i in range(N))

T=int(input())
for _ in range(T):
	temp=list(map(int,input().split()))
	if temp[2]>1e6: assert 0
	temp[2]+=1
	print(scary_sum_naive(*temp)%998244353)
0