본문 바로가기
알고리즘/백준

[백준 5565번 ː 자바(JAVA)] 영수증

by 그릿er 2020. 7. 9.

 

 

 

 

import java.io.*;

public class Baekjoon5565 {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		
		for(int i=0; i<9; i++) {
			int minus = Integer.parseInt(br.readLine());
			n -= minus;
		}
		System.out.println(n);
	}

}