結果
問題 | No.2896 Monotonic Prime Factors |
ユーザー | moon17 |
提出日時 | 2024-09-20 22:41:06 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 360 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 82,360 KB |
実行使用メモリ | 114,160 KB |
最終ジャッジ日時 | 2024-09-20 22:41:16 |
合計ジャッジ時間 | 7,281 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 115 ms
82,060 KB |
testcase_01 | AC | 111 ms
83,116 KB |
testcase_02 | AC | 112 ms
82,744 KB |
testcase_03 | AC | 114 ms
82,604 KB |
testcase_04 | AC | 702 ms
113,584 KB |
testcase_05 | RE | - |
testcase_06 | AC | 290 ms
113,444 KB |
testcase_07 | AC | 558 ms
113,640 KB |
testcase_08 | AC | 628 ms
113,584 KB |
testcase_09 | RE | - |
testcase_10 | AC | 279 ms
107,292 KB |
testcase_11 | AC | 191 ms
102,184 KB |
testcase_12 | AC | 174 ms
101,300 KB |
testcase_13 | AC | 287 ms
108,200 KB |
testcase_14 | AC | 365 ms
110,660 KB |
testcase_15 | AC | 165 ms
100,300 KB |
testcase_16 | AC | 211 ms
104,128 KB |
testcase_17 | AC | 188 ms
101,868 KB |
testcase_18 | AC | 405 ms
113,000 KB |
testcase_19 | AC | 189 ms
102,484 KB |
ソースコード
(q,),*e=[[*map(int,s.split())]for s in open(0)] M=998244353 N=10**6 F=[1]*N;l,f=F[:],F[:] for i in range(2,N):F[i]=F[i-1]*i%M;l[i]=-(M//i)*l[M%i]%M;f[i]=f[i-1]*l[i]%M c=lambda l,k:(k<=l)*F[l]*f[k]*f[l-k]%M def pf(n): a,f=[],2 while f*f<=n: if n%f:f+=1 else:a+=[f];n//=f if n>1:a+=[n] return a t=0 for a,b in e: l=len(pf(a)) t+=l print(c(t-1,b-1))