백준 #15726번 이칙연산

jhj·2024년 2월 12일

백준 JAVA

목록 보기
236/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		double a = sc.nextDouble();
		double b = sc.nextDouble();
		double c = sc.nextDouble();
		
		int total1 = (int) (a * b / c);
		int total2 = (int) (a / b * c);
		
		if(total1 > total2) {
			System.out.println(total1);
		}else {
			System.out.println(total2);
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글