Mój kod działa dokładnie tak jak jest napisane w zadaniu. Mimo wszystko nie chce mi zaliczyć zadania. Może mi ktoś pomóc?
package pl.codegym.task.task07.task0727;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Zmiana funkcjonalności
*/
public class Solution {
public static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args)throws IOException {
ArrayList<String> texts = new ArrayList<>();
String s;
while (true){
s = reader.readLine();
if(s.isEmpty()){
break;
}
texts.add(s);
}
ArrayList<String> texts2 = new ArrayList<>();
for(String text:texts){
s = text + " " + text;
if(text.length()%2!=0){
s +=" " + text;
}
texts2.add(s);
}
for(String text: texts2){
System.out.println(text);
}
}
}