답안 #1025787

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1025787 2024-07-17T10:08:05 Z vjudge1 Košnja (COCI17_kosnja) C++17
50 / 50
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;
}


/*

      
 
  
*/
# 결과 실행 시간 메모리 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