슈콩

[SWEA] 구구단 1 본문

Algorithms/SWEA

[SWEA] 구구단 1

shukong 2025. 11. 17. 20:39

 

 

[문제]

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

 

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());
		boolean[] check = new boolean[101];
		for(int i=1;i<=9;i++) {
			for(int j=1;j<=9;j++) {
				check[i*j] = true;
			}
		}
		for(int tc=1;tc<=T;tc++) {
			int n = Integer.parseInt(br.readLine());
			String result = "No";
			if(check[n]) result = "Yes";
			System.out.println("#"+tc+" "+result);
		}
	}
}

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

[SWEA] 계산기  (0) 2025.11.17
[SWEA] 반반  (0) 2025.11.17
[SWEA] 구독자 전쟁  (0) 2025.11.17
[SWEA] XY 문자열 1  (0) 2025.11.17
[SWEA] 8일차 - 암호문2  (0) 2025.11.17