Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int nrDivPrimi(int n) {
- int f = 2, nr = 0;
- while (n > 1) {
- int p = 0;
- while (n % f == 0) {
- n /= f;
- p++;
- }
- if (p % 2) {
- nr++;
- }
- p = 0;
- f++;
- }
- return nr;
- }
- int main() {
- //test code here
- return 0;
- }
Add Comment
Please, Sign In to add comment