結果

問題 No.2798 Multiple Chain
ユーザー 👑 potato167
提出日時 2024-06-24 02:45:55
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 416 bytes
コンパイル時間 1,939 ms
コンパイル使用メモリ 194,332 KB
最終ジャッジ日時 2025-02-22 00:18:08
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
	// make table
	const int L = 62;
	vector<ll> dp(L);
	dp[0] = 1;
	for (int i = 1; i < L; i++) for (int j = 0; j < L - i; j++){
		dp[i + j] += dp[j];
	}
	// input
	ll N;
	cin >> N;
	ll ans = 1;
	for (int i = 2; i <= 1001001; i++){
		int tmp = 0;
		while (N % i == 0){
			tmp++;
			N /= i;
		}
		ans *= dp[tmp];
	}
	cout << ans << "\n";
}
0