개요[ | ]
- HR자바 Java End-of-file
Java
Copy
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Scanner sc = new Scanner(System.in);
int i = 0;
String str;
while( sc.hasNext() ) {
str = sc.nextLine();
i++;
System.out.format("%d %s\n", i, str);
}
}
}
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.