結果
| 問題 |
No.1966 Median of Divisors
|
| コンテスト | |
| ユーザー |
googol_S0
|
| 提出日時 | 2022-06-03 21:31:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 534 ms / 2,000 ms |
| コード長 | 230 bytes |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 82,532 KB |
| 実行使用メモリ | 77,776 KB |
| 最終ジャッジ日時 | 2024-09-21 02:28:16 |
| 合計ジャッジ時間 | 5,173 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 12 |
ソースコード
mod=10**9+7 def f1(x): return (x*(x+1)//2)%mod def f2(x): return (x*(x+1)%mod)*(2*x+1)%mod*pow(6,mod-2,mod)%mod for t in range(int(input())): N,M=map(int,input().split()) print((f1(pow(N,M,mod))-f2(pow(N,M//2,mod)))%mod)
googol_S0