結果
問題 |
No.2750 Number of Prime Factors
|
ユーザー |
|
提出日時 | 2024-05-10 22:48:34 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 455 bytes |
コンパイル時間 | 3,088 ms |
コンパイル使用メモリ | 246,256 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-20 06:47:22 |
合計ジャッジ時間 | 3,905 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); vector<int> factor = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59}; long long n; cin >> n; int ans = 0; long long num = 1; for (int i = 0; i < factor.size(); i++){ if (n/num < factor[i]){ cout << i << endl; break; } num *= factor[i]; } return 0; }