fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int tmp,tong;
  4. int main(){
  5. for (int i = 0; i < 3; i++){
  6. cin >> tmp;
  7. if (tmp % 2 == 0){
  8. tong += tmp / 2;
  9. }
  10. else {
  11. tong += (tmp / 2) + 1;
  12. }
  13. }
  14. cout << tong;
  15. }
Success #stdin #stdout 0.01s 5320KB
stdin
35 
42 
39 
stdout
59