Advertisement
TAHMID37

iut individual 11 ques no c

Jun 6th, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.12 KB | None | 0 0
  1. /*  TAHMID RAHMAN
  2.     DAMIAN FOREVER
  3.      MATH LOVER
  4.     NEVER GIVE UP
  5. */
  6. #include<bits/stdc++.h>
  7. using namespace std;
  8. #define pi acos(-1.0)
  9. #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
  10. #define ll long long
  11. #define pb push_back
  12. #define fi first
  13. #define se second
  14. #define in insert
  15. #define mp make_pair
  16. #define GCD(a,b) __gcd(a,b);
  17. #define endl "\n"
  18. #define FRU freopen("out.txt","w",stdout)
  19. #define FRO freopen("in.txt","r",stdin)
  20. #define INFLL 9223372036854775807
  21. //Don't hesitate to ask me if you don't understand my code.......Happy coding,Tahmid...;
  22. int main()
  23. {
  24.     fastio;
  25.     ll x,y,f,i,c=0;
  26.     cin>>x>>y>>f;
  27.  
  28.     while(1)
  29.     {
  30.         ll n=x;
  31.         vector<ll>v;
  32.         v.clear();
  33.         for(i=1;i<=sqrt(n);i++)
  34.         {
  35.             if(n%i==0)
  36.             {
  37.                 v.pb(i);
  38.                 if(i!=(n/i))
  39.                     v.pb(n/i);
  40.             }
  41.         }
  42.         if(v.size()==f)
  43.         {
  44.             c++;
  45.         }
  46.  
  47.         if(x!=y)
  48.         {
  49.             x++;
  50.         }
  51.         else
  52.             break;
  53.     }
  54.     cout<<c<<endl;
  55.  
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement