Hackerrank – Problem Statement
A description of the problem can be found on Hackerrank.
Solution
I created solution in:
All solutions are also available on my GitHub.
Java
1 2 3 4 5 6 7 8 9 10 11 12 |
import java.util.*; class Solution { public static void main(String [] args) { Scanner sc = new Scanner(System.in); int line = 1; while (sc.hasNextLine()) { System.out.println(line ++ + " " + sc.nextLine()); } sc.close(); } } |