hacker rank 15th problem solution(java substring)

15.java Substring


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 in = new Scanner(System.in);
        String S = in.next();
      String substr="";
        int start = in.nextInt();
        int end = in.nextInt();
       substr = S.substring(start, end);
      System.out.println(substr);

    }
}

Compiler Message
Success
Input (stdin)Download
Helloworld
3 7
Expected OutputDownload
lowo

Comments

Popular posts from this blog

Amazon Web Services

Google Code-In mentorship experience :)

Hacker Rank all java and python problem solutions