본문으로 바로가기
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


백준알고리즘


https://www.acmicpc.net/problem/11719


쉬운건데 왜 이걸 썻냐면 hasNextLine를 사용했다는 것 그거 하나 때문에 써봄...

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNextLine()) {
            String input = scan.nextLine();
            System.out.println(input);
        }
        scan.close();
    }
}