結果
問題 |
No.2750 Number of Prime Factors
|
ユーザー |
|
提出日時 | 2024-05-10 22:07:47 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 389 bytes |
コンパイル時間 | 1,961 ms |
コンパイル使用メモリ | 194,244 KB |
最終ジャッジ日時 | 2025-02-21 12:50:28 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll=long long; constexpr int MOD=998244353; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll N; cin>>N; vector p={2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47}; ll t=1; for(int i=0;i<(int)p.size();i++){ t*=p[i]; if(t>N){ cout<<i<<'\n'; return 0; } } cout<<p.size()<<'\n'; }