結果
| 問題 | No.1844 Divisors Sum Sum |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-18 22:38:09 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 450 bytes |
| 記録 | |
| コンパイル時間 | 1,031 ms |
| コンパイル使用メモリ | 184,380 KB |
| 実行使用メモリ | 11,432 KB |
| 最終ジャッジ日時 | 2026-03-18 20:26:27 |
| 合計ジャッジ時間 | 39,959 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 26 TLE * 8 |
ソースコード
#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();
}