結果
問題 |
No.1844 Divisors Sum Sum
|
ユーザー |
|
提出日時 | 2022-02-18 22:38:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 450 bytes |
コンパイル時間 | 1,514 ms |
コンパイル使用メモリ | 166,356 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-06-29 09:24:48 |
合計ジャッジ時間 | 9,070 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 25 TLE * 1 -- * 12 |
ソースコード
#include <bits/stdc++.h> #define ll long long using namespace std; void solve(){ int n; cin>>n; ll ans=1; for(int i = 0;i<n;i++){ int a,b; cin>>a>>b; ans*=pow(a,b); } ll res=0; for(int i=1;i<=ans;i++){ if(ans%i==0){ for(int j = 1; j <= i ; j++) if(i%j==0) res+=j; } } cout<<res<<endl; } int main(){ int t=1; // cin>>t; while(t--)solve(); }