#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; for(a = 0; a <= 5; a++){ for(b = 0; b <= 5-a; b++){ for(c = 0; c <= 9; c++){ if(a*100 + b *10 + c + b*100 + c*10 + c == 532) cout<<a<<" "<<b<<" "<<c<<endl; } } } }
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; for(a = 0; a <= 5; a++){ for(b = 0; b <= 5-a; b++){ for(c = 0; c <= 9; c++){ if(a*100 + b *10 + c + b*100 + c*10 + c == 532) cout<<a<<" "<<b<<" "<<c<<endl; } } } }