슈콩

[SWEA] 직사각형 길이 찾기 본문

Algorithms/SWEA

[SWEA] 직사각형 길이 찾기

shukong 2025. 11. 16. 17:01

 

 

[문제]

https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWFPmsqqALwDFAV0

 

SW Expert Academy

SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!

swexpertacademy.com

 

 

 

[소스 코드]

import java.io.*;
import java.util.*;
public class Solution {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st;
		int T = Integer.parseInt(br.readLine());
		for(int tc=1;tc<=T;tc++) {
			int[] num = new int[101];
			st = new StringTokenizer(br.readLine());
			for(int i=0;i<3;i++) {
				int len = Integer.parseInt(st.nextToken());
				num[len]++;
			}
			for(int i=1;i<=100;i++) {
				if(num[i]!=0 && num[i]%2!=0) {
					System.out.println("#"+tc+" "+i);
					break;
				}
			}
		}
	}
}

'Algorithms > SWEA' 카테고리의 다른 글

[SWEA] 지명 선수  (0) 2025.11.16
[SWEA] 석찬이의 받아쓰기  (0) 2025.11.16
[SWEA] 최대 성적표 만들기  (0) 2025.11.16
[SWEA] 홀수 피라미드  (0) 2025.11.16
[SWEA] [Professional] 합  (0) 2025.11.16