結果
| 問題 |
No.1383 Numbers of Product
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2021-02-07 22:23:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 468 bytes |
| コンパイル時間 | 2,211 ms |
| コンパイル使用メモリ | 198,116 KB |
| 最終ジャッジ日時 | 2025-01-18 14:57:34 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 31 WA * 20 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main(){
ll n,k,m;
cin>>n>>k>>m;
map<ll,ll> M;
for(ll a=1;a<100000;a++){
ll tmp=a;
for(ll b=1;;b++){
if(log(tmp)+log(a+b*k)>log(n)) break;
tmp*=a+b*k;
M[tmp]++;
}
}
ll ans=0;
for(auto x:M){
if(x.second==m) ans++;
}
cout<<ans<<endl;
return 0;
}
umezo