Ad
Code
Diff
  • public class Kata{		
    		public static String multiply(String input,int times){
    		      
        for (int i = 1; i < times; i++) {input += input.substring(0, input.length() / i);}
          
    	  return times!=0? input: "";
    	}
    }
    • public class Kata{
    • public static String multiply(String input,int times){
    • String save = input;
    • for (int i = 1; i < times; i++) {
    • System.out.println(input);
    • input += save;
    • }
    • if(times == 0){
    • input = "";
    • }
    • return input;
    • for (int i = 1; i < times; i++) {input += input.substring(0, input.length() / i);}
    • return times!=0? input: "";
    • }
    • }