### Rafan_Haizar's blog

By Rafan_Haizar, history, 6 months ago,

Happy Ramadan Mubarak. Coz it's the month of Ramadan. Hope You guys fast the full 30 days.From Sehri to Iftar. And give "Zackat" as well as spending time praying to Allah and spending time with family members.

• -3

By Rafan_Haizar, history, 6 months ago,

Hi guys. I finally got the solution to the problem, basically what happens is that the test case also check your code for the program. So for you guys who are stuck in the problem. Just make sure to read the statements carefully. The problem with my code was that I used <100 instead of <=100, I didn't read the input statement very carefully. So, did you like it. Comment down below.

• -1

By Rafan_Haizar, history, 6 months ago,

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);
}
}
}
}
}