본문 바로가기

분류 전체보기502

[Java]백준 10869번: 입출력과 사칙연산 단계 - 사칙연산 1. Scanner 사용 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); scan.close(); System.out.println(a+b); System.out.println(a-b); System.out.println(a*b); System.out.println(a/b); System.out.println(a%b); } } 2. BufferedReader 사용 import java.io.BufferedReader; import java.io... 2023. 4. 16.
[Python]백준 1008번: 입출력과 사칙연산 단계 - A/B a,b = map(int, input().split()) print(a/b) 2023. 4. 16.
[TypeScript]백준 1008번: 입출력과 사칙연산 단계 - A/B const fs = require('fs'); const inputData = fs.readFileSync(0, 'utf8').toString().split(' '); const a = parseInt(inputData[0]); const b = parseInt(inputData[1]); console.log(a/b); 2023. 4. 16.
[Java]백준 1008번: 입출력과 사칙연산 단계 - A/B import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] str = br.readLine().split(" "); double A = Double.parseDouble(str[0]); double B = Double.parseDouble(str[1]); System.out.println(A/B); } } 2023. 4. 16.
[Python]백준 10998번: 입출력과 사칙연산 단계 - A×B a,b = map(int, input().split()) print(a*b) 2023. 4. 16.
[TypeScript]백준 10998번: 입출력과 사칙연산 단계 - A×B const fs = require('fs'); const inputData = fs.readFileSync(0, 'utf8').toString().split(' '); const a = parseInt(inputData[0]); const b = parseInt(inputData[1]); console.log(a*b); 2023. 4. 16.
[Java]백준 10998번: 입출력과 사칙연산 단계 - A×B import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] str = br.readLine().split(" "); int a = Integer.parseInt(str[0]); int b = Integer.parseInt(str[1]); System.out.println(a*b); } } 2023. 4. 16.
[Python]백준 1001번: 입출력과 사칙연산 단계 - A-B a,b = map(int, input().split()) print(a-b) 2023. 4. 16.