結果
問題 | No.1844 Divisors Sum Sum |
ユーザー |
![]() |
提出日時 | 2022-02-18 22:11:47 |
言語 | D (dmd 2.109.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 445 bytes |
コンパイル時間 | 2,158 ms |
コンパイル使用メモリ | 205,624 KB |
実行使用メモリ | 16,448 KB |
最終ジャッジ日時 | 2024-06-22 14:20:02 |
合計ジャッジ時間 | 10,861 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 37 |
ソースコード
import std;void main() {int L;readf("%d\n", L);ulong M = 10 ^^ 9 + 7;ulong res = 1;foreach (_; 0 .. L) {ulong P, e;readf("%d %d\n", P, e);ulong inv = powmod(P-1, M-2, M);ulong num = (M + powmod(P, e+1, M) - 1) % M;num = (num * inv) % M;num = (num * P % M + M - e - 1) % M;num = (num * inv) % M;res = (res * num) % M;}res.writeln;}