日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > php開源 > php教程 > 71A - Way Too Long Words

71A - Way Too Long Words

來源:程序員人生   發布時間:2014-12-25 09:03:59 閱讀次數:4141次
A. Way Too Long Words
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Sometimes some words like "localization" or "internationalization" are so long that writing them many times in one text is quite tiresome.

Let's consider a word too long, if its length is strictly more than 10 characters. All too long words should be replaced with a special abbreviation.

This abbreviation is made like this: we write down the first and the last letter of a word and between them we write the number of letters between the first and the last letters. That number is in decimal system and doesn't contain any leading zeroes.

Thus, "localization" will be spelt as "l10n", and "internationalization? will be spelt as "i18n".

You are suggested to automatize the process of changing the words with abbreviations. At that all too long words should be replaced by the abbreviation and the words that are not too long should not undergo any changes.

Input

The first line contains an integer n (1?≤?n?≤?100). Each of the following n lines contains one word. All the words consist of lowercase Latin letters and possess the lengths of from 1 to 100 characters.

Output

Print n lines. The i-th line should contain the result of replacing of the i-th word from the input data.

Sample test(s)
input
4 word localization internationalization pneumonoultramicroscopicsilicovolcanoconiosis
output
word l10n i18n p43s
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); for(int i =0;i<=n;i++) { String x=sc.nextLine(); if(x.length()>10) { char[] ch = x.toCharArray(); System.out.print(ch[0]);System.out.print(x.length()⑵);System.out.print(ch[x.length()⑴]); System.out.println(); } else System.out.println(x); } } }

生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 日日夜夜超碰 | 一区二区三区在线 | 青青av| 国产精品久久久久久久久久久久冷 | 日韩毛片免费视频一级特黄 | 久久黄色视 | 中文字幕国产日韩 | 处女网站| 国产专区精品 | 亚洲黄色片子 | 国产午夜精品久久 | 国产精品久久久久久久久久久久久久 | 成人久久久久 | 美女又黄又免费的视频 | 欧美午夜精品一区二区蜜桃 | 欧美日韩激情一区 | 国产真实乱全部视频 | 一区二区日韩精品 | 五月婷婷视频 | 毛片毛片毛片毛片毛片毛片 | 精品久久久久久久久久久院品网 | 久久久天堂国产精品女人 | 国产精品久久久久一区二区三区 | 欧美日韩中文 | 亚洲视频在线一区 | 亚洲国产精品一区二区第一页 | www.国产一区| 欧美亚洲第一区 | 99精品免费视频 | 国产一区二区三区免费观看 | 91久久久久久久久 | 欧美福利一区 | 亚洲国产精品一区二区久久 | 日本欧美久久久 | 久久大陆| 欧美xxxx18国产 | 99精品视频网 | 亚洲激情二区 | 国产偷窥女厕所高清 | 欧美一区二区三区免费看 | 欧美福利专区 |