슈콩

[SWEA] 팔씨름 본문

Algorithms/SWEA

[SWEA] 팔씨름

shukong 2025. 11. 16. 16:02

 

 

[문제]

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

 

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));
		int T = Integer.parseInt(br.readLine());
		for(int tc=1;tc<=T;tc++) {
			String info = br.readLine();
			int result = 15 - info.length();
			for(int i=0;i<info.length();i++) {
				if(info.charAt(i)=='o') result++;
			}
			if(result>=8) {
				System.out.println("#"+tc+" YES");
			}
			else System.out.println("#"+tc+" NO");
		}
	}
}

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

[SWEA] 홀수 피라미드  (0) 2025.11.16
[SWEA] [Professional] 합  (0) 2025.11.16
[SWEA] 유효숫자 표기  (0) 2025.11.16
[SWEA] 두 전구  (0) 2025.11.15
[SWEA] 제곱수 만들기  (0) 2025.11.15