题解 | #删除字符串中出现次数最少的字符#
删除字符串中出现次数最少的字符
https://www.nowcoder.com/practice/05182d328eb848dda7fdd5e029a56da9
while 1: try: raw = input() cnt = dict() for s in raw: if s not in cnt.keys(): cnt[s] = 1 else: cnt[s] += 1 minCnt = min(cnt.values()) for k in cnt.keys(): if cnt[k] == minCnt: raw = raw.replace(k, '') print(raw) except: break
#Python#