#include #include #include #include using namespace std; using P = pair; int mygcd(int x, int y){ while(y != 0){ int r = x%y; x = y; y = r; } return x; } vector

facs(int x){ vector

res; const int x0 = x; for(int i = 2; i*i <= x0; i++){ if(x%i == 0){ res.emplace_back(i, 0); while(x%i == 0){ res.back().second++; x /= i; } } } if(x > 1){ res.emplace_back(x, 1); } return res; } int main(){ int l, r; cin >> l >> r; const int lim = 200010; vector cnt(lim, 0); vector

v1 = facs(l); set mem; for(auto &it: v1){ mem.emplace(it.first); cnt[it.first] = it.second*l; } for(int i = l+1; i <= r; i++){ vector

v = facs(i); for(auto &it: v){ if(mem.count(it.first) == 0){ cnt[it.first] = 0; mem.erase(it.first); }else{ cnt[it.first] = min(cnt[it.first], it.second*i); } } } long long ans = 1; for(int i = 1; i < lim; i++){ for(int j = 0; j < cnt[i]; j++) ans *= i; } cout << ans << endl; return 0; }