結果
問題 |
No.3186 Big Order
|
ユーザー |
![]() |
提出日時 | 2025-06-22 04:31:35 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 15 ms / 2,000 ms |
コード長 | 413 bytes |
コンパイル時間 | 7,903 ms |
コンパイル使用メモリ | 361,272 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-22 04:31:45 |
合計ジャッジ時間 | 9,341 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
ソースコード
#include <iostream> #include <numeric> #include <boost/multiprecision/cpp_int.hpp> namespace mp=boost::multiprecision; int main(){ int t; std::cin>>t; for(;t--;){ mp::uint512_t a,b,c,d=1; std::cin>>a>>b>>c; mp::uint256_t z=0; for(int i=133;i--;){ d*=d; z*=2; if(b>>i&1){ d*=a; } while(d%c==0){ d/=c; z+=1; } d=gcd(d,c); } std::cout<<z%998244353<<std::endl; } }