Submission #381339

#TimeUsernameProblemLanguageResultExecution timeMemory
381339BilAktauAlmansurKošnja (COCI17_kosnja)C++17
0 / 50
136 ms632 KiB
#include <bits/stdc++.h> using namespace std; int main () { int k=0; cin>>k; int n=0, m=0; 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...