結果
問題 |
No.1383 Numbers of Product
|
ユーザー |
|
提出日時 | 2021-12-09 08:14:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 530 bytes |
コンパイル時間 | 1,904 ms |
コンパイル使用メモリ | 166,316 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-16 18:35:08 |
合計ジャッジ時間 | 13,207 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 (int 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; }