Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- long b=0;
- unsigned long long n;
- cin >> n;
- double gg=sqrt(n);
- for(int i=1; i<=gg; i++)
- {
- if(n % i == 0)
- cout << i << '\n';
- }
- for(int i=int(gg); i>=2; i--)
- {
- if(n % i == 0)
- cout << n / i << '\n';
- }
- cout.flush();
- cout<<n;
- for(int i=1;i<=n;i++)
- {
- if(n%i==0)
- b++;
- }
- cout<<endl<<b;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement