Language: C++

#include<bits/stdc++.h>
using namespace std;

#define rep(i,n) for(ll i = 0; i < n; i++)
#define per(i,n) for(ll i = n-1; i >= 0; i--)
#define REP(i,n) for(ll i = 1; i < n; i++)
#define PER(i,n) for(ll i = n; i >= 1; i--)
#define sz(x) int(x.size())
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define YesorNo(a) printf(a ? "Yes\n" : "No\n")
#define endl '\n'
#define fi first
#define se second
using ll = long long;
using P = pair<int,int>;
using Pl = pair<ll,ll>;
using vi = vector<int>;
using vii = vector<vi>;
using vl = vector<ll>;
using vll = vector<vl>;
using vs = vector<string>;
using vb = vector<bool>;
using vc = vector<char>;
using vcc = vector<vc>;
using vP = vector<P>;
using vPP = vector<vP>;
using vPl = vector<Pl>;
const int dx[] = {0,1,0,-1,1,1,-1,-1};
const int dy[] = {1,0,-1,0,1,-1,-1,1};
const int inf = (1<<30)-1;
const ll infll = (1LL<<62)-1;
ll ceil(const ll &a, const ll &b){return ((a)+(b)-1)/b;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }



int main(){
  int n, m;
  cin >> n >> m;
  int ans = 0;
  for(int i = 1; i*i <= m; i++) {
    if(m % i == 0 && i <= m/n) ans = i;
  }
  cout << ans << endl;
}#include<bits/stdc++.h>
using namespace std;

#define rep(i,n) for(ll i = 0; i < n; i++)
#define per(i,n) for(ll i = n-1; i >= 0; i--)
#define REP(i,n) for(ll i = 1; i < n; i++)
#define PER(i,n) for(ll i = n; i >= 1; i--)
#define sz(x) int(x.size())
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define YesorNo(a) printf(a ? "Yes\n" : "No\n")
#define endl '\n'
#define fi first
#define se second
using ll = long long;
using P = pair<int,int>;
using Pl = pair<ll,ll>;
using vi = vector<int>;
using vii = vector<vi>;
using vl = vector<ll>;
using vll = vector<vl>;
using vs = vector<string>;
using vb = vector<bool>;
using vc = vector<char>;
using vcc = vector<vc>;
using vP = vector<P>;
using vPP = vector<vP>;
using vPl = vector<Pl>;
const int dx[] = {0,1,0,-1,1,1,-1,-1};
const int dy[] = {1,0,-1,0,1,-1,-1,1};
const int inf = (1<<30)-1;
const ll infll = (1LL<<62)-1;
ll ceil(const ll &a, const ll &b){return ((a)+(b)-1)/b;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }



int main(){
  int n, m;
  cin >> n >> m;
  int ans = 0;
  for(int i = 1; i*i <= m; i++) {
    if(m % i == 0 && i <= m/n) ans = i;
  }
  cout << ans << endl;
}

Compiler output:
a.cc:47:2: error: stray '#' in program
   47 | }#include<bits/stdc++.h>
      |  ^
a.cc:47:3: error: 'include' does not name a type
   47 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:75:11: error: redefinition of 'const int dx []'
   75 | const int dx[] = {0,1,0,-1,1,1,-1,-1};
      |           ^~
a.cc:29:11: note: 'const int dx [8]' previously defined here
   29 | const int dx[] = {0,1,0,-1,1,1,-1,-1};
      |           ^~
a.cc:76:11: error: redefinition of 'const int dy []'
   76 | const int dy[] = {1,0,-1,0,1,-1,-1,1};
      |           ^~
a.cc:30:11: note: 'const int dy [8]' previously defined here
   30 | const int dy[] = {1,0,-1,0,1,-1,-1,1};
      |           ^~
a.cc:77:11: error: redefinition of 'const int inf'
   77 | const int inf = (1<<30)-1;
      |           ^~~
a.cc:31:11: note: 'const int inf' previously defined here
   31 | const int inf = (1<<30)-1;
      |           ^~~
a.cc:78:10: error: redefinition of 'const ll infll'
   78 | const ll infll = (1LL<<62)-1;
      |          ^~~~~
a.cc:32:10: note: 'const ll infll' previously defined here
   32 | const ll infll = (1LL<<62)-1;
      |          ^~~~~
a.cc:79:4: error: redefinition of 'll ceil(const ll&, const ll&)'
   79 | ll ceil(const ll &a, const ll &b){return ((a)+(b)-1)/b;}
      |    ^~~~
a.cc:33:4: note: 'll ceil(const ll&, const ll&)' previously defined here
   33 | ll ceil(const ll &a, const ll &b){return ((a)+(b)-1)/b;}
      |    ^~~~
a.cc:80:31: error: redefinition of 'template<class T> bool chmin(T&, T)'
   80 | template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
      |                               ^~~~~
a.cc:34:31: note: 'template<class T> bool chmin(T&, T)' previously declared here
   34 | template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
      |                               ^~~~~
a.cc:81:31: error: redefinition of 'template<class T> bool chmax(T&, T)'
   81 | template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
      |                               ^~~~~
a.cc:35:31: note: 'template<class T> bool chmax(T&, T)' previously declared here
   35 | template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
      |                               ^~~~~
a.cc:85:5: error: redefinition of 'int main()'
   85 | int main(){
      |     ^~~~
a.cc:39:5: note: 'int main()' previously defined here
   39 | int main(){
      |     ^~~~