Varianta 95 / Subiectul 3 / Problema 4 |
#include<iostream> using namespace std; int main() { long s; cin>>s; long x=s/3; if(s%3==0) cout<<x<<" "<<x<<" "<<x; if(s%3==1) cout<<x<<" "<<x<<" "<<x+1; if(s%3==2) cout<<x<<" "<<x+1<<" "<<x+1; system("pause"); return 0; } |