AOJ0565 Lunch

問題リンク Lunch

  • 解法

パスタの最小 + ジュースの最小 - 50
を求めるだけです。

  • ソース
import java.util.Scanner;

//Lunch
public class AOJ0565 {

	void run(){
		Scanner sc = new Scanner(System.in);
		System.out.println((Math.min(sc.nextInt(), Math.min(sc.nextInt(), sc.nextInt())))+Math.min(sc.nextInt(), sc.nextInt())-50);
	}
	
	public static void main(String[] args) {
		new AOJ0565().run();
	}
}