Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 백준
- designpattern
- pscp
- Spring
- 점세개
- createQuery
- 숫자야구
- 디자인패턴
- 데코레이터패턴
- mycp
- BubbleSorting
- springboot
- 자바
- 10844
- junit
- @NotEmpty
- 여러인수
- Linux
- @Spring
- C
- 10951
- setParameter
- 전치행렬 #C
- gradle
- 쉬운 계단 수
- @ModelAttribute
- NamedParameterNotBound
- 자료구조
- java
- decorator
Archives
- Today
- Total
목록10951 (1)
...

문제를 이해 못 해서 헤맸다... 한 케이스 입력 -> 결과 출력 -> 다시 입력 -> 출력 -> 입력값이 더이상 없으면 종료 Scanner 의 hasnext()를 이용하여 문제를 해결하였다. import java.util.Scanner; public class Main { public static void main(String[] args) { int a,b; Scanner sc = new Scanner(System.in); while(sc.hasNext()) { a = sc.nextInt(); b = sc.nextInt(); System.out.println(a+b); } } }
백준
2022. 2. 17. 18:57