슈콩

[SWEA] 몬스터 사냥 본문

Algorithms/SWEA

[SWEA] 몬스터 사냥

shukong 2025. 11. 18. 21:36

 

 

[문제]

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

 

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 d = Integer.parseInt(st.nextToken());
			int l = Integer.parseInt(st.nextToken());
			int n = Integer.parseInt(st.nextToken());
			int result = 0;
			for(int i=0;i<n;i++) {
				result += d + d*i*l/100;
			}
			System.out.println("#"+tc+" "+result);
		}
	}
}

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

[SWEA] 두가지 빵의 딜레마  (0) 2025.11.18
[SWEA] 일요일  (0) 2025.11.18
[SWEA] 평범한 숫자  (0) 2025.11.18
[SWEA] 색상환  (0) 2025.11.18
[SWEA] 로봇 언어  (0) 2025.11.18