Need Help in a problem.

Revision en1, by 1111111111111111111, 2020-10-18 07:30:50

Getting TLE in this problem. Code:

#include <bits/stdc++.h>

using namespace std;
#define endl "\n"

int main()
{

    ios::sync_with_stdio(false);cin.tie(0);
    int a;
    cin >> a;
    for(int i = 1; i <= a; i++){
        if(a % i == 0){
            cout << i << endl;
        }
    }
    return 0;
}


History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English 1111111111111111111 2020-10-18 07:30:50 422 Initial revision (published)