結果

問題 No.2750 Number of Prime Factors
ユーザー cho435
提出日時 2024-05-10 21:39:33
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 386 bytes
コンパイル時間 3,765 ms
コンパイル使用メモリ 251,536 KB
最終ジャッジ日時 2025-02-21 12:27:12
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using mint = atcoder::modint1000000007;

int main(){
	ll n;
	cin>>n;
	vector<ll> p={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47};
	ll ans=1;
	int i=0;
	for(auto x:p){
		ans*=x;
		if(ans>n){
			cout<<i<<endl;
			return 0;
		}
		i++;
	}
	cout<<i<<endl;
}
0