[알고리즘문제풀기] 덧셈식 출력하기

silver's avatar
Jul 13, 2025
[알고리즘문제풀기] 덧셈식 출력하기

문제

내가 작성한 정답

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+" + "+ b+" = "+(a+b)); } }

다른 사람들의 정답

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.printf("%d + %d = %d",a,b,a+b); } }
Share article

silver