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
- setParameter
- Spring
- 쉬운 계단 수
- @ModelAttribute
- 디자인패턴
- decorator
- 데코레이터패턴
- BubbleSorting
- 10951
- C
- Linux
- 10844
- mycp
- junit
- 전치행렬 #C
- 자바
- @Spring
- 점세개
- NamedParameterNotBound
- createQuery
- 여러인수
- @NotEmpty
- gradle
- 자료구조
- java
- pscp
- designpattern
- springboot
- 숫자야구
- 백준
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