INPUT a$
min = 255
FOR i = 1 TO LEN(a$)
FOR j = 1 TO LEN(a$)
IF i <> j AND MID$(a$, i, 1) = MID$(a$, j, 1) THEN kol = kol + 1
NEXT
IF kol < min THEN min = kol
kol = 0
NEXT
FOR i = 1 TO LEN(a$)
FOR j = 1 TO LEN(a$)
IF i <> j AND MID$(a$, i, 1) = MID$(a$, j, 1) THEN kol = kol + 1
NEXT
IF kol = min THEN PRINT MID$(a$, i, 1)
kol = 0
NEXT
Тестирование выполнено в программе QB64 ( Скачать )