Hello,
I am trying to solve A. Way Too Long Words in C# (I already have a solution in c++). https://codeforces.com/problemset/problem/71/A
The code below gives correct answers when I try and compile it on my own. However, when submitting it for verdict through the Codeforces system, turns out as the Wrong answer. If you have an idea of how to change the code to get a successful submission, please help.
Thank you
basecamper
using System;
namespace Way_Too_Long_Words { class Program { static void Main(string[] args) { int n; n = int.Parse(Console.ReadLine());
int i = 1; while (i <= n) { string inputName = Console.ReadLine(); if (inputName.Length > 10) { Console.Write(inputName[0]); Console.Write(inputName.Length - 2); Console.Write(inputName[inputName.Length - 1]); Console.Read(); } else { Console.WriteLine(inputName); Console.Read(); } i++; } } }
}