Submission #381330

#TimeUsernameProblemLanguageResultExecution timeMemory
381330BilAktauAlmansurKošnja (COCI17_kosnja)C++17
0 / 50
135 ms748 KiB
#include <bits/stdc++.h> using namespace std; int main () { int k; cin>>k; int n, m; for (int i=0; i<k; i++) { cin>>n>>m; if (n==1 || m==1) { cout << 0; } else { if (max(n, m)%2==0) { cout << max(n, m); } else { cout << max(n, m)+1; } } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...