Adventure of 빠타박스
article thumbnail
728x90
728x90
SMALL

4. 1001번_A-B_ 쉬움

 

문제

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

입력

첫째 줄에 A와 B가 주어진다. (0 < A, B < 10)

출력

첫째 줄에 A-B를 출력한다.

예제 입력 1

3 2

예제 출력 1

1

출처

비슷한 문제

알고리즘 분류


C++

#include <iostream>
using namespace std;

int main()
{
    int a, b;
    cin>> a >> b;
    
    cout << a - b << endl;   
}

C

#include "stdio.h" // < >이거든 "" 이거든 둘다 사용가능 
int main()
{
    int a, b;
    scanf("%d %d", &a, &b);
    
    printf("%d\\n",a-b);
}

Python

A, B = input().split()

print(int(A)-int(B))
728x90
728x90
LIST
profile

Adventure of 빠타박스

@PPATABOX

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!