Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Solution {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- String[] arr = sc.nextLine().split(" ");
- int k = sc.nextInt();
- for(int i=0;i<k;i++){
- System.out.print(arr[i]+" ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment