Untitled
#include <iostream> using namespace std; int main() { int a, b, first, second, k, counter = 0; cin >> a >> b >> k; first = max(a, b); second = min(a, b); while (first >= k) { first -= k; counter++; if (second >= k) { second -= k; counter++; } else break; } cout << counter; return 0; }