|
|
вернуться в форумTime error Послано Levan 13 окт 2015 20:16 How do it more fast? #include <iostream> using namespace std; int main() { int x, y, c;
cin >> x >> y >> c;
if((x + y) < c) { cout << "Impossible" << endl; } else { for(int i = 0; i <= x; i++) { for(int j = 0; j <= y; j++) { if((i + j) == c) { cout << i << " " << j << endl; return 0; } } } } } Edited by author 13.10.2015 20:23 Edited by author 13.10.2015 20:23 Re: Time error Послано Daniil 20 апр 2016 18:08 Here is other way to solve If U have X u do not need finding Y Edited by author 20.04.2016 18:25 |
|
|