Advertisement
roronoa

développer une expression descriptive

Jun 27th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. import java.util.*;
  2. import java.io.*;
  3. import java.math.*;
  4.  
  5. /**
  6.  * Auto-generated code below aims at helping you parse
  7.  * the standard input according to the problem statement.
  8.  **/
  9. class Solution {
  10.  
  11.     public static void main(String args[]) {
  12.         Scanner in = new Scanner(System.in);
  13.         String D = in.nextLine();
  14.         for(String chunk : D.split(" "))
  15.         {
  16.             int nbr = Integer.parseInt(chunk.replaceAll("[^0-9]",""));        
  17.             for(int i = 0; i < nbr; i++)
  18.                 System.out.print(chunk.replaceAll("[0-9]",""));
  19.         }
  20.        
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement