結果
問題 | No.2750 Number of Prime Factors |
ユーザー |
![]() |
提出日時 | 2024-05-10 21:33:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 543 bytes |
コンパイル時間 | 4,034 ms |
コンパイル使用メモリ | 251,144 KB |
最終ジャッジ日時 | 2025-02-21 12:19:26 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
ソースコード
#include <stdio.h> #include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 1000000000000000001 int main(){ long long n; cin>>n; vector<long long> p = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97}; long long ans = 0; rep(i,p.size()){ if(n>=p[i]){ n /= p[i]; } else{ cout<<i<<endl; return 0; } } return 0; }