Source Code
#include <iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<string>
#include<set>
#include <random>
#define ll long long

using namespace std; 


int main() {
	ll n, x, y,n1,n2;
	cin >> n >> x >> y;
	n1 = n / x + 1;
	n2 = n / y + 1;
	n1 *= x;
	n2 *= y;
	cout << max(n1, n2);
}
Copy
Hurry up OthmanMaher
GNU G++17
0 ms
384 KB
Wrong Answer