[SWEA] 7102 준홍이의 카드놀이

Time Lapse :5min 0sec

7102.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
//5:00
int main(int argc, char** argv)
{
int test_case;
int T, N, M, max, i;
setbuf(stdout, NULL);
scanf("%d", &T);
for (test_case = 1; test_case <= T; ++test_case)
{
scanf("%d %d",&N, &M);
printf("#%d ",test_case);
max = N>M ? N+1 : M+1;
for(i=N > M ? M+1 : N+1 ;i<= max ;i++){
printf("%d ",i);
}
printf("\n");

}
return 0; //정상종료시 반드시 0을 리턴해야 합니다.
}
Author: Song Hayoung
Link: https://songhayoung.github.io/2020/08/04/PS/SWEA/7102/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.