# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1025787 |
2024-07-17T10:08:05 Z |
vjudge1 |
Košnja (COCI17_kosnja) |
C++17 |
|
70 ms |
596 KB |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--)
{
int n, m;
cin >> n >> m;
n = min(n, m);
if(n % 2)
cout << (n / 2) * 4 << endl;
else
cout << (n / 2) * 4 - 2 << endl;
}
return 0;
}
/*
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
44 ms |
524 KB |
Output is correct |
7 |
Correct |
65 ms |
596 KB |
Output is correct |
8 |
Correct |
45 ms |
596 KB |
Output is correct |
9 |
Correct |
70 ms |
596 KB |
Output is correct |
10 |
Correct |
45 ms |
592 KB |
Output is correct |