inblog logo
|
silver
    알고리즘문제풀기

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

    silver's avatar
    silver
    May 21, 2025
    [알고리즘문제풀기] a와 b 출력하기
    Contents
    문제내가 작성한 정답

    문제

    school.programmers.co.kr
    https://school.programmers.co.kr/learn/courses/30/lessons/181951

    내가 작성한 정답

    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

    RSS·Powered by Inblog