Author: @somashekhar001
Tester: @somashekhar001
Editorialist: @somashekhar001
DIFFICULTY:
EASY
PREREQUISITES:
MATHS
PROBLEM:
N and M are given
a1+a2+a3+…+aN=M.
maximum possible value of the greatest common divisor of a1,a2,a3,…aN.
SOLUTIONS:
#include<bits/stdc++.h>
using namespace std;
int main(){
int m,n;cin>>n>>m;
for(int i=n;i<=m;i++){
if(m%i==0){
cout<<m/i<<endl;
return 0;
}
}
return 0;
}