Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int count(long long x)
- {
- long long k = 0;
- long long i = 1;
- for(; i * i < x; i++)
- {
- if(x % i == 0)
- k += 2;
- }
- if(i * i == x)
- k++;
- return k;
- }
- main()
- {
- long long x;
- cin >> x;
- long long i = x;
- long long c = 0;
- long long p = 1.01 * x;
- // cout << count(510510);
- if(x > 100000000LL)
- {
- if(x % 2 == 1)
- x++;
- cout << x;
- return 0;
- }
- while(true)
- {
- if(c > 10000)
- break;
- if(i > p)
- break;
- else
- {
- if(count(i) >= 100)
- cout << i, exit(0);
- }
- i++;
- c++;
- }
- cout << -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement