Untitled
unknown
c_cpp
2 years ago
308 B
7
Indexable
#include <iostream>
using namespace std;
int main() {
long long x;
cin >> x;
for(long long i = 1; i * i <= x; i += 1) {
if(x % i == 0) {
cout << i << " " ;
if(i != x / i) {
cout << x / i << " ";
}
}
}
return 0;
}
Editor is loading...
Leave a Comment