結果
問題 |
No.2818 A Game I Play to Pass the Time
|
ユーザー |
![]() |
提出日時 | 2024-06-29 13:38:26 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 557 bytes |
コンパイル時間 | 5,011 ms |
コンパイル使用メモリ | 309,072 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-29 13:38:39 |
合計ジャッジ時間 | 9,389 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 11 |
ソースコード
#include<bits/stdc++.h> #include<atcoder/all> using namespace std; using namespace atcoder; using mint=modint998244353; long long divisor(long long N){ vector<pair<long long,long long>> vec; for(int i=2;N>1;i++){ if(N%i==0){ int mem=0; while(N%i==0){ N/=i; mem++; } vec.emplace_back(i,mem); } } long long ans=1; for(auto i : vec){ ans*=i.second+1; } return ans; } int main(){ int Q; scanf("%d",&Q); long long ans=0; for(;Q--;){ long long N,S; scanf("%lld%lld",&N,&S); ans+=divisor(N); } printf("%lld\n",ans); }