백준온라인

[백준온라인] 1000번 A+B

cbkpar 2019. 11. 30. 13:59

문제 : https://www.acmicpc.net/problem/1000

 

1000번: A+B

문제 두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오. 입력 첫째 줄에 A와 B가 주어진다. (0 < A, B < 10) 출력 첫째 줄에 A+B를 출력한다. 예제 입력 1 복사 1 2 예제 출력 1 복사 3 힌트 여기를 누르면 1000번 예제 소스를 볼 수 있습니다....

www.acmicpc.net

 

JAVA

 

채점 번호 아이디 문제 번호 결과 메모리 시간 언어 코드 길이
16309663 cbkpar 1000 맞았습니다!! 12952KB 72ms Java 318B
1
2
3
4
5
6
7
8
9
10
11
import java.io.*;
 
public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String[] arr = str.split(" ");
        System.out.println(Integer.parseInt(arr[0])+Integer.parseInt(arr[1]));
    }
}

 

 

 

 

Python

채점 번호 아이디 문제 번호 결과 메모리 시간 언어 코드 길이
16309690 cbkpar 1000 맞았습니다!! 29284KB 56ms Python 3 43B
1
2
a, b = map(int, input().split())
print(a+b)

 

 

 

C

채점 번호 아이디 문제 번호 결과 메모리 시간 언어 코드 길이
16309712 cbkpar 1000 맞았습니다!! 1112KB 0ms C 109B
1
2
3
4
5
6
7
8
9
#include <stdio.h>
 
int main()
{
    int a,b;
    scanf("%d %d",&a,&b);
    printf("%d",a+b);
    return 0;
}

 

 

C++

채점 번호 아이디 문제 번호 결과 메모리 시간 언어 코드 길이
16309731 cbkpar 1000 맞았습니다!! 1980KB 0ms C++17 132B
1
2
3
4
5
6
7
8
#include <iostream>
using namespace std;
int main() {
    auto a=0, b=0;
    cin >> a >> b;
    cout << a+<< endl;
    return 0;
}
 

f