이전에 쓴 백준 1000번과 거의 동일하다고 보면 된다.
(+에서 -로만 바뀌었으니 당연하지 않나)
#C
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a-b);
return 0;
}
#C++
#include <iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
cout<<a-b;
return 0;
}
#Python
a, b = map(int, input().split())
print(a-b)
반응형
'PS > 백준' 카테고리의 다른 글
[백준/Baekjoon]<2475번> 검증수 [C/C++/Python][Class 1] (0) | 2022.07.08 |
---|---|
[백준/Baekjoon]<2438번> 별 찍기 - 1 [C/C++/Python][Class 1] (0) | 2022.07.07 |
[백준/Baekjoon]<1330번> 두 수 비교하기 [C/C++/Python][Class 1] (0) | 2022.07.06 |
[백준/Baekjoon]<1008번> A/B [C/C++/Python][Class 1] (0) | 2022.07.05 |
[백준/Baekjoon]<1000번> A+B [C/C++/Python][Class 1] (0) | 2022.07.03 |