wrong output format unexpected end of file — token expected codeforces

Правка en2, от Rafan_Haizar, 2023-03-21 17:31:55

Hi, I'm rafan haizar. I'm just 11yrs old. Today this happened while I solving "A — Way Too Long Words" problem.

This is the code :--

import java.util.Scanner;

/** * * @author abdul */ public class CodeForces {

public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int w=sc.nextInt();
    String s=null;
    if(w>=1&&w<=100){
        for(int i=1;i<=w;i++){
            s=sc.next();
            if(s.length()>0&&s.length()<100){
                if(s.length()>10){
                    char[] v=s.toCharArray();
                    char f=v[0];
                    int sz=v.length-2;
                    char o=v[v.length-1];
                    System.out.println(f+""+sz+""+o);
                }else{
                    System.out.println(s);
                }
            }
        }
    }
}

} Please Help Mee.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Rafan_Haizar 2023-03-21 17:31:55 12
en1 Английский Rafan_Haizar 2023-03-21 17:31:06 1045 Initial revision (published)