fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int A,c=0,i,j;
  7. cin>>A;
  8. for(i=1;i<A;i++){
  9. for(j=1;j<=i;j++){
  10. if(j*i==A) c++;
  11. if(i==j||j==i) c--;
  12. }
  13. }
  14. cout<<c;
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5296KB
stdin
 6
stdout
-4