Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int a[3];
- cin >> a[0] >> a[1] >> a[2];
- int A = -1, B = -1, C = -1;
- for(int i = 0; i <= 500; i++) {
- int tmpa = a[0] + i;
- if(tmpa > a[1] and tmpa > a[2] and A == -1) {
- A = i;
- }
- int tmpb = a[1] + i;
- if(tmpb > a[0] and tmpb > a[2] and B == -1) {
- B = i;
- }
- int tmpc = a[2] + i;
- if(tmpc > a[0] and tmpc > a[1] and C == -1) {
- C = i;
- }
- }
- cout << A << " " << B << " " << C << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement