알고리즘 및 자료구조/문제
백준알고리즘 11719번 그대로 출력하기2
ktko
2018. 5. 1. 11:37
백준알고리즘
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(); } }