麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

1112. Stucked Keyboard (20)

2019-11-08 19:52:41
字體:
供稿:網(wǎng)友

1112. Stucked Keyboard (20)

時(shí)間限制 400 ms內(nèi)存限制 65536 kB代碼長度限制 16000 B判題程序 Standard 作者 CHEN, Yue

On a broken keyboard, some of the keys are always stucked. So when you type some sentences, the characters corresponding to those keys will appear repeatedly on screen for k times.

Now given a resulting string on screen, you are supposed to list all the possible stucked keys, and the original string.

Notice that there might be some characters that are typed repeatedly. The stucked key will always repeat output for a fixed k times whenever it is PRessed. For example, when k=3, from the string "thiiis iiisss a teeeeeest" we know that the keys "i" and "e" might be stucked, but "s" is not even though it appears repeatedly sometimes. The original string could be "this isss a teest".

Input Specification:

Each input file contains one test case. For each case, the 1st line gives a positive integer k ( 1<k<=100 ) which is the output repeating times of a stucked key. The 2nd line contains the resulting string on screen, which consists of no more than 1000 characters from {a-z}, {0-9} and "_". It is guaranteed that the string is non-empty.

Output Specification:

For each test case, print in one line the possible stucked keys, in the order of being detected. Make sure that each key is printed once only. Then in the next line print the original string. It is guaranteed that there is at least one stucked key.

Sample Input:

3caseee1__thiiis_iiisss_a_teeeeeest

Sample Output:

eicase1__this_isss_a_teest

a=int(input())b=input()arra={}i=0answer=[]j=' 'while i < (len(b)):    if b[i] not in arra:        arra[b[i]]=0        answer.append(b[i])    if arra[b[i]]>=0:        if b[i:i+a]==b[i]*a:            arra[b[i]]=1            i+=a-1        else:            arra[b[i]]=-1    i+=1for i in answer:    if arra[i]==1:        print(i,end="")print("")i=0while i < (len(b)):    if arra[b[i]]==1:        i+=a-1    print(b[i],end="")    i+=1感想:第一次用py寫代碼,主要是一些語法的問題
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 成人偷拍片视频在线观看 | 99视频在线观看视频 | 一区二区精品视频在线观看 | 国产精品视频一区二区三区四区国 | 99日韩精品视频 | 黄色大片在线免费观看 | 日韩色视频在线观看 | 丰满年轻岳中文字幕一区二区 | 91久久久久久 | 欧美黄色大片免费观看 | 国产一级做a爰片在线看 | 欧美 日韩 亚洲 中文 | 最近日本电影hd免费观看 | 国产一级小视频 | 黄色片免费在线 | 毛片在线视频免费观看 | 久久视频精品 | 欧美亚洲国产一区 | 欧美在线观看视频一区二区 | av在线官网 | 久久影院免费观看 | 一区在线视频观看 | 九草在线| 欧美成人免费 | 亚洲国产女同久久 | 国产超碰人人做人人爱 | 婷婷一区二区三区四区 | 日本娇小videos高潮 | 一级电影在线免费观看 | 一区二区三区四区高清视频 | 国产一区二区在线免费播放 | 国产一精品一av一免费爽爽 | 日韩字幕 | 成人羞羞国产免费游戏 | av成人在线观看 | 国产精品野外av久久久 | 伦一区二区三区中文字幕v亚洲 | 久久国产精品网 | 一区二区免费 | 欧美黄成人免费网站大全 | 久久这|