結果

問題 No.2750 Number of Prime Factors
ユーザー tour2st
提出日時 2024-05-10 21:30:52
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 184µs
コード長 617 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 499 ms
コンパイル使用メモリ 131,264 KB
実行使用メモリ 9,824 KB
最終ジャッジ日時 2026-10-05 01:31:16
合計ジャッジ時間 2,324 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <random>
#include <iomanip>
#include <time.h>
#include <bitset>
#include <map>
#include <numeric>
#include <atcoder/modint>
#include <atcoder/dsu>
using namespace atcoder;
using namespace std;
using mint = modint998244353;
#define ll long long
#define pll pair<ll,ll>

ll n,prime[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47},ans;

int main()
{
    cin >> n;
    for(int i=0;i<14;i++) prime[i+1]*=prime[i];
    for(int i=0;i<15;i++) if(n>=prime[i]) ans = i+1;
    cout << ans << endl;
}
0