Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- long long n, m, k, s = 0;
- int t;
- cin >> t;
- while ( t-- )
- {
- cin >> n >> m >> k;
- s = n * m * k;
- if ( n == 1 && k % 2 == 0 && m % 2 == 0 ) s -= 1;
- if ( m == 1 && k % 2 == 0 && n % 2 == 0 ) s -= 1;
- if ( k == 1 && n % 2 == 0 && m % 2 == 0 ) s -= 1;
- cout << s << '\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement