[CodingTest] Beakjoon Q1001

김정훈·2021년 1월 14일
0

CodingTest

목록 보기
6/6

문제

두 정수 A와 B를 입력받은 다음, A-B를 출력하는 프로그램을 작성하시오.

출처
https://www.acmicpc.net/problem/1001

답안

import java.util.Scanner;

public class Q1000 {

	public static void main(String[] args) {

		//두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.
		Scanner sc = new Scanner(System.in);
		int a, b;
		a = sc.nextInt();
		b = sc.nextInt();
		
		System.out.println(a + b);
	}

}

메모리 : 18292KB
시간 : 224ms
코드길이 : 235B
언어 : java 11

profile
Newbie Developer

0개의 댓글