結果
問題 |
No.2952 Invision of Multiples
|
ユーザー |
|
提出日時 | 2024-07-19 08:15:18 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 424 bytes |
コンパイル時間 | 5,216 ms |
コンパイル使用メモリ | 308,252 KB |
実行使用メモリ | 10,272 KB |
最終ジャッジ日時 | 2024-09-13 16:10:30 |
合計ジャッジ時間 | 15,856 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 TLE * 1 -- * 34 |
ソースコード
#include<bits/stdc++.h> using namespace std; #include<atcoder/all> using namespace atcoder; using mint=atcoder::modint998244353; int main(){ int n,m;cin>>n>>m; vector<int> d(n);for(auto&&e:d)cin>>e; mint prod=1;for(auto&&e:d)prod*=m/e; mint ans=0; for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ mint tprod=prod/(m/d[i])/(m/d[j]); ans+=tprod*floor_sum(m/d[i],d[j],d[i],d[i]-1); } } cout<<ans.val()<<"\n"; }