Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

Everything has an expiration date

BAEKJOON - 11382 : 꼬마 정민 본문

BAEKJOON - challenge/입출력과 사칙연산

BAEKJOON - 11382 : 꼬마 정민

Jelly-fish 2023. 9. 17. 12:20

import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		// 1. 변수 선언
		Scanner sc = new Scanner(System.in);
		long a, b, c;
		
		// 2. 사용자로부터 세 개의 정수 입력받기
		
		a = sc.nextLong();
		b = sc.nextLong();
		c = sc.nextLong();
        
        // [RunTime ERROR]===============================
        // ★ nextInt() 로 받으면 안 된다!
        // ★ nextLong() 으로 입력 받아야만 문제에서 주어진
        //    정수의 범위 합을 구할 수 있다!
        //===============================================
		
		// 3. 세 개의 수 더해서 출력.

		System.out.println(a + b + c);

	}
}