슈콩

[SWEA] 두가지 빵의 딜레마 본문

Algorithms/SWEA

[SWEA] 두가지 빵의 딜레마

shukong 2025. 11. 18. 21:51

 

 

[문제]

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

 

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 a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			int select = Math.min(a, b);
			System.out.println("#"+tc+" "+(c/select));
		}
	}
}

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

[SWEA] Digit sum  (0) 2025.11.18
[SWEA] 동철이의 프로그래밍 대회  (0) 2025.11.18
[SWEA] 일요일  (0) 2025.11.18
[SWEA] 몬스터 사냥  (0) 2025.11.18
[SWEA] 평범한 숫자  (0) 2025.11.18