728x90
출처-https://www.acmicpc.net/problem/5543
728x90
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan=new Scanner(System.in);
int hbg[]=new int[3];
int drk[]=new int[2];
int min;
for (int i=0;i<3;i++)
hbg[i]=scan.nextInt();
min=hbg[0];
for (int i=1;i<3;i++)
min=Math.min(min,hbg[i]);
for (int i=0;i<2;i++)
drk[i]=scan.nextInt();
min+=Math.min(drk[0], drk[1]);
min-=50;
System.out.println(min);
}
}
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 2523] 별 찍기 - 13 (java) (0) | 2020.08.25 |
---|---|
[백준, BOJ 10817] 세 수 (java) (0) | 2020.08.25 |
[백준, BOJ 10039] 평균 점수 (java) (0) | 2020.08.25 |
[백준, BOJ 10953] A+B - 6 (java) (0) | 2020.08.21 |
[백준, BOJ 1110] 더하기 사이클 (java) (0) | 2020.08.21 |