Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. long long n, m, k, s = 0;
  8. int t, nr;
  9.  
  10. cin >> t;
  11. while ( t-- )
  12. {
  13. cin >> n >> m >> k;
  14. s = n * m * k;
  15.  
  16. nr = 0;
  17. if ( n % 2 == 1 ) nr++;
  18. if ( m % 2 == 1 ) nr++;
  19. if ( k % 2 == 1 ) nr++;
  20.  
  21. if ( nr == 1 ) s--;
  22.  
  23. cout << s << '\n';
  24. }
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement