結果

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

ソースコード

diff #

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

int main(){
    unsigned long long n;cin>>n;
    unsigned long long cr=1;
    int ct=0;
    for(int i=2;i<100;i++){
        bool sk=false;
        for(int j=2;j*j<=i;j++){
            if(i%j==0){
                sk=true;
                break;
            }
        }
        if(sk)continue;
        if(n/cr<i)break;
        if(n<cr*i)break;
        cr*=i;
        ct++;
    }
    cout<<ct<<"\n";
}
0