結果

問題 No.888 約数の総和
ユーザー vjudge1
提出日時 2025-07-07 23:06:50
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 2,251 ms
コンパイル使用メモリ 194,484 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-07-07 23:06:57
合計ジャッジ時間 6,274 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 24 TLE * 1 -- * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
long long n;
int main() {
cin>>n;
for(int i=2;i*i<=n;i++){
    if(n%i==0){
        int dem =0;
        while(n%i==0){
            n/=i;
            dem++;
        }
        cout<<i<<' '<<dem<<endl;
    }
}
if(n!=1){
    cout<<n<<' '<<1<<endl;
}
return 0;
}
0