結果
問題 |
No.2750 Number of Prime Factors
|
ユーザー |
![]() |
提出日時 | 2023-03-13 20:42:31 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 363 bytes |
コンパイル時間 | 1,691 ms |
コンパイル使用メモリ | 193,404 KB |
最終ジャッジ日時 | 2025-02-11 10:59:41 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; 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 m = 1; for(ll i = 0; i < 15; i++){ m *= p[i]; if(m > n){ cout << i << endl; return 0; } } cout << 15 << endl; }