結果
問題 |
No.1383 Numbers of Product
|
ユーザー |
|
提出日時 | 2021-12-09 08:15:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 536 bytes |
コンパイル時間 | 1,458 ms |
コンパイル使用メモリ | 166,152 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-16 18:36:05 |
合計ジャッジ時間 | 7,308 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 RE * 46 |
ソースコード
#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}; long long res = 0; while (a*(a + k) <= n){ long long cur = a*(a + k); for (long long i = 1; cur <= n; cur *= (a + k*i)){ ++Key[cur]; if (Key[cur] == m){ ++res; } if (Key[cur] > m){ --res; } ++i; } ++a; } cout << res << endl; }