JAVA EOF HACCKERANK
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception{
InputStreamReader r=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(r);
String str = "";
int count=0;
while ((str = br.readLine()) != null) {
count++;
System.out.println(count+" "+str);
}
br.close();
}
}
Comments
Post a Comment