답안 #37971

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
37971 2017-12-29T19:15:41 Z tmk Košnja (COCI17_kosnja) C++14
50 / 50
23 ms 2016 KB
#include<bits/stdc++.h>
using namespace std;
#define st first
#define nd second
#define pb push_back
typedef long long LL;


int main()
{
	int k;
	scanf("%d",&k);
	for(int i=0;i<k;i++)
	{
		int n,m;
		scanf("%d",&n);
		scanf("%d",&m);
		int wynik=(min(n,m)-1)*2;
		printf("%d\n",wynik);
	}

	return 0;
}

Compilation message

kosnja.cpp: In function 'int main()':
kosnja.cpp:12:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&k);
                ^
kosnja.cpp:16:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&n);
                 ^
kosnja.cpp:17:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&m);
                 ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2016 KB Output is correct
2 Correct 0 ms 2016 KB Output is correct
3 Correct 0 ms 2016 KB Output is correct
4 Correct 0 ms 2016 KB Output is correct
5 Correct 0 ms 2016 KB Output is correct
6 Correct 13 ms 2016 KB Output is correct
7 Correct 19 ms 2016 KB Output is correct
8 Correct 9 ms 2016 KB Output is correct
9 Correct 23 ms 2016 KB Output is correct
10 Correct 13 ms 2016 KB Output is correct