fork(2) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main(){
  5. ios::sync_with_stdio(false);
  6. cin.tie(0);
  7. int k=0;
  8. long long n;
  9. cin >> n;
  10. for(int i = 1; i*i <= n; i++){
  11. if(n % i == 0)
  12. k += 2;
  13. }
  14. if(sqrt(n) / 2 == 0)
  15. cout << k-1;
  16. else
  17. cout << k;
  18. }
Time limit exceeded #stdin #stdout 5s 2820KB
stdin
Standard input is empty
stdout
Standard output is empty