top of page
Click here to go to the home page of AskTheCode.

Java End-of-file | HACKERRANK

Team ATC

Updated: Sep 17, 2020

Asked: Anonymously | Category: JAVA

 

import java.io.*;

import java.util.*;

import java.text.*;

import java.math.*;

import java.util.regex.*;


public class Solution {


public static void main(String[] args) {

Scanner sc=new Scanner(System.in);

int l=1;

while(sc.hasNext())

{

System.out.println(l+" "+sc.nextLine());

l++;

}

sc.close();

}

}



Recent Posts

See All

留言


bottom of page