본문 바로가기
공부/알고리즘 공부

[백준] 10998번 : A*B - JAVA [자바]

by 고구밍 2022. 6. 16.

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

 

10998번: A×B

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

www.acmicpc.net

 

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main{
    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String str = br.readLine();
        StringTokenizer st = new StringTokenizer(str, " ");
        int a = Integer.parseInt(st.nextToken());
        int b = Integer.parseInt(st.nextToken());

        System.out.println(a * b);
    }


}

 

https://goguming2.tistory.com/128

 

[백준] 1000번 : A+B - JAVA [자바]

https://www.acmicpc.net/problem/1000 1000번: A+B 두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오. www.acmicpc.net  readLine() 과 read() 더보기 BufferedReader 의 경우 문자열을..

goguming2.tistory.com