Submission #381412

#TimeUsernameProblemLanguageResultExecution timeMemory
381412D_BKošnja (COCI17_kosnja)C++17
50 / 50
138 ms620 KiB
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; for (int i = 1;i<=t;i++){ int x,y; cin>>x>>y; if (x==1 || y==1){ cout<<0<<'\n'; } else{ cout<<(min(x,y)-1)*2<<'\n'; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...