fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int r;
  6. cin >> r;
  7. for(int i = 0; i < r; ++i){
  8. int l, w, h;
  9. cin >> l >> w >> h;
  10. int s = 2 * h * (w + l);
  11. cout << (s % 16 != 0 ? s / 16 + 1 : s / 16) << endl;
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 4420KB
stdin
1
1 1 1
stdout
1