Submission #381368

#TimeUsernameProblemLanguageResultExecution timeMemory
381368BilAktauAlmansurKošnja (COCI17_kosnja)C++17
50 / 50
141 ms748 KiB
#include <bits/stdc++.h> using namespace std; int ans; 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 { int um=min(n, m); for (int i=2; i<=um; i++) { ans+=2; } cout << ans << endl; ans=0; } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...