Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int K, A, B;
- cin >> K >> A >> B;
- if (A == B)
- {
- cout << "NE" << endl;
- return 0;
- }
- int X = 0;
- X = K / (B - A);
- if (K + X * A == X * B)
- {
- cout << X << endl;
- }
- else {cout << "NE" << endl;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement