슈콩

[SWEA] 과자 분배 본문

Algorithms/SWEA

[SWEA] 과자 분배

shukong 2025. 11. 20. 21:08

 

 

[문제]

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

 

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++) {
			st = new StringTokenizer(br.readLine());
			int n = Integer.parseInt(st.nextToken());
			int k = Integer.parseInt(st.nextToken());
			if(n%k>0) {
				System.out.println("#"+tc+" 1");
			}
			else System.out.println("#"+tc+" 0");
		}
	}
}

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

[SWEA] 부먹왕국의 차원 관문  (0) 2025.11.20
[SWEA] 순열1  (0) 2025.11.20
[SWEA] 집합 비교  (0) 2025.11.20
[SWEA] 새샘이와 세 소수  (0) 2025.11.20
[SWEA] 삼삼 트리플 게임  (0) 2025.11.19