fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main(){
  6.  
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);
  9. cout.tie(0);
  10.  
  11. int liczba;
  12. cin>>liczba;
  13. vector<int> dzielniki(liczba,0);
  14. for(int i=1;i<liczba;i++){
  15. if(liczba%i==0)
  16. dzielniki.push_back(i);}
  17. for(int i=1;i<liczba;i++)
  18. {
  19. if(dzielniki[i]>0)
  20. cout<<dzielniki[i]<<endl;;
  21. }
  22.  
  23. }
Success #stdin #stdout 0.01s 5240KB
stdin
12
stdout
Standard output is empty