답안 #166642

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
166642 2019-12-03T10:51:27 Z ArKCa Košnja (COCI17_kosnja) C++17
50 / 50
21 ms 632 KB
#include<bits/stdc++.h>

using namespace std;
int t,a,b;
int main(){
	scanf("%d",&t);
	while(t--){
		scanf("%d %d",&a,&b);
		printf("%d\n",(min(a,b)-1)*2 );
	}
}

Compilation message

kosnja.cpp: In function 'int main()':
kosnja.cpp:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&t);
  ~~~~~^~~~~~~~~
kosnja.cpp:8:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d",&a,&b);
   ~~~~~^~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 380 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 14 ms 504 KB Output is correct
7 Correct 21 ms 604 KB Output is correct
8 Correct 15 ms 544 KB Output is correct
9 Correct 21 ms 632 KB Output is correct
10 Correct 15 ms 504 KB Output is correct