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

 

10998번: A×B

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

www.acmicpc.net

문제 요약 : A×B 계산 후 출력

 

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

A×B 출력

 

 

JAVA

채점 번호 아이디 문제 번호 결과 메모리 시간 언어 코드 길이
16319084 cbkpar 10998 맞았습니다!! 12928KB 76ms Java 360B
import java.io.*;

public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int a,b;
		String str = "";
		
		str = br.readLine();
		String[] arr = str.split(" ");
		a = Integer.parseInt(arr[0]);
		b = Integer.parseInt(arr[1]);
		System.out.println(a*b);
	}
}

 

 

 

Python

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

 

 

 

C

채점 번호 아이디 문제 번호 결과 메모리 시간 언어 코드 길이
16319111 cbkpar 10998 맞았습니다!! 1112KB 0ms C 109B
#include <stdio.h>

int main()
{
    int a,b;
    scanf("%d %d",&a,&b);
    printf("%d",a*b);
    return 0;
}

 

 

 

C++

채점 번호 아이디 문제 번호 결과 메모리 시간 언어 코드 길이
16319131 cbkpar 10998 맞았습니다!! 1980KB 0ms C++17 120B
#include <iostream>
using namespace std;

int main() {
    int a,b;
    cin >> a >> b;
    cout << a*b;
    return 0;
}

'백준온라인' 카테고리의 다른 글

[백준온라인] 13460번 구슬 탈출 2  (0) 2019.12.01
[백준온라인] 1008번 A/B  (0) 2019.12.01
[백준온라인] 1001번 A-B  (0) 2019.12.01
[백준온라인] 10172번 개  (0) 2019.12.01
[백준온라인] 10171번 고양이  (0) 2019.12.01

+ Recent posts