Accepted
Code
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
using ll = long long;
void solve() {
ll n, m, k;
cin >> n >> m >> k;
ll c = (n & 1) + (m & 1) + (k & 1);
cout << n + m + k - c + (c > 0) << endl;
return;
}
int main() {
ios::sync_with_stdio(false); cin.tie(0);
int tc = 1;
cin >> tc;
for (int t = 1; t <= tc; t++) {
// cout << "Case " << t << ": ";
solve();
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1195 B. Palindrome
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-06-01 17:02:40
- Judged At
- 2025-06-01 17:02:40
- Judged By
- Score
- 100
- Total Time
- 48ms
- Peak Memory
- 1.453 MiB