多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

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

71A - Way Too Long Words

來源:程序員人生   發布時間:2014-12-25 09:03:59 閱讀次數:4136次
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); } } }

生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 在线午夜影院 | 欧美色图偷窥自拍 | 日本在线观 | 经典三级第一页 | 亚洲国产成人精品一区二区三区 | 午夜视频高清在线aaa | 亚洲国产欧美一区 | 国产国产人精品视频69 | 免费 黄 色 人成 视频 | 全黄大全大色全免费大片 | 亚洲第一永久在线观看 | 亚洲第一色在线 | 日本免费中文字幕 | 依人在线视频 | 日韩a级毛片免费视频 | 男女xx网站 | 最近中文字幕国语免费 | 精品欧美一区二区三区在线 | 美女被h| 亚洲精品456人成在线 | 一区二区精品久久 | 欧美一区二区三区在观看 | 影院成人区精品一区二区婷婷丽春院影视 | 一级毛片真人不卡免费播 | 国产精品v欧美精品v日韩精品 | 国产精品久久久久久久成人午夜 | 不卡视频一区二区三区 | 国产亚洲免费观看 | 国产免费a v吧在线观看不卡 | 中文精品视频一区二区在线观看 | 国产第一福利 | 五月婷婷在线播放 | 国产丝袜一区二区三区在线观看 | 国产成人黄网址在线视频 | 99热成人精品国产免国语的 | 精品日韩一区二区 | 日韩色网站 | 国产免费一级片 | 国产激情一区二区三区在线观看 | 国内精品一级毛片免费看 | 国产不卡一区二区三区免费视 |