Written by
java-style
on
on
[백준 BAEKJOON] 10950번 A+B-3 문제 (JAVA)
[백준 BAEKJOON] 10950번 A+B-3 문제 (JAVA)
문제
소스코드
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); int [] array = new int[t]; for (int i = 0; i < t; i++) { int a = sc.nextInt(); int b = sc.nextInt(); array[i] = a + b; } //for for (int i : array) { System.out.println(i); } //for } //main } //class
배열과 for문을 이용하여 풀이하였다.
처음에는 문제를 읽고 입출력을 어떻게 표현하라는 건지 이해를 못했었다.
from http://choitaetae.tistory.com/40 by ccl(A) rewrite - 2021-09-05 23:26:55