[알고리즘문제풀기] a와 b 출력하기

silver's avatar
May 21, 2025
[알고리즘문제풀기] a와 b 출력하기

문제

내가 작성한 정답

Java

import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); System.out.println("a = " + a + "\n" + "b = " + b); } }

JavaScript

const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); let input = []; rl.on('line', function (line) { input = line.split(' '); }).on('close', function () { console.log("a = "+Number(input[0]) + "\n" + "b = " + Number(input[1])); });
Share article

silver