https://www.acmicpc.net/problem/11718
반복문 당시 EOF에 관한 문제 풀이와 유사하다.
https://velog.io/@qwerty7878/%EB%B0%B1%EC%A4%80-10951%EB%B2%88-A-B-4-java
package com.example.baekjoon;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()){
String s = sc.nextLine();
System.out.println(s);
}
sc.close();
}
}