結果

問題 No.1383 Numbers of Product
ユーザー kibou1136
提出日時 2021-12-09 08:09:40
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 454 bytes
コンパイル時間 1,458 ms
コンパイル使用メモリ 168,348 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-16 18:28:48
合計ジャッジ時間 11,453 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 3 WA * 2 RE * 46
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

long long n, k, m;



int main(){
    cin >> n >> k >> m;
    long long a = 1;
    long long Key[n + 1] = {0};
    while (a*(a + k) <= n){
        long long cur = a*(a + k);
        for (int i = 2; cur <= n; cur *= (a + k*i)){
            ++Key[cur];
        }
        ++a;
    }
    long long res = 0;
    for (long long i = 1; i <= n; ++i){
        if (Key[i] == m) ++res;
    }
    cout << res << endl;
}
0