Problem:


Score : 200 points

Problem Statement

You are given a string S consisting of lowercase English letters.
Find the lexicographically (alphabetically) smallest lowercase English letter that does not occur in S.
If every lowercase English letter occurs in S, print None instead.

Constraints

1 \leq |S| \leq 10^5 (|S| is the length of string S.)

S consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

Print the lexicographically smallest lowercase English letter that does not occur in S.
If every lowercase English letter occurs in S, print None instead.

Sample Input 1

atcoderregularcontest

Sample Output 1

b

The string atcoderregularcontest contains a, but does not contain b.

Sample Input 2

abcdefghijklmnopqrstuvwxyz

Sample Output 2

None

This string contains every lowercase English letter.

Sample Input 3

fajsonlslfepbjtsaayxbymeskptcumtwrmkkinjxnnucagfrg

Sample Output 3

d



Sample input:
atcoderregularcontest


Sample output:
b

Submission status: Runtime Error

Solution code:
input()

c = s[0]
for i in s:
    c = min(c, i)

if c == 'a':
    print('None')
else:
    print(c)

Submission status: Runtime Error

Solution code:
 s = input()

alp = [chr(i) for i in range(97, 97+26)]

flag = [False for i in range(26)]

for c in s:
    for i in range(26):
        if c == alp[i]:
            flag[i] = True


def pr():
    for i in range(26):
        if flag[i] == False:
            return alp[i]

    return 'None'

print(pr())

Submission status: Runtime Error

Solution code:
s=list(input())
n=[]
for i in s:
    ns=ord(i)
    n=n.append(ns)
print(chr(min(n))

Submission status: Runtime Error

Solution code:
import string
s = list(input())
a = list(string.ascii_lowercase)
l = []
s.sort()
if s == a:
    print("None")
else:
    for index, i in enumerate(a):
        if i not in s:
            l.append(i)
    print(min(l))

Submission status: Runtime Error

Solution code:
import sys

s = sorted(list({i for i in input()}))
a = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]

for i in range(26):
    if (s[i] != a[i]):
        print(a[i])
        sys.exit()

print("None")

Submission status: Runtime Error

Solution code:
/*
 * b.cpp
 *
 *  Created on: 2017/08/21
 *      Author: pinebooks
 */

#include <iostream>
#include <string>

using namespace std;

int main(void){
	string s;
	cin >> s;
	for (char c = 'a'; c < 'z'; c++) {
		bool found = false;
		for (int i=0; i<s.length(); i++){
			if (s[i] == c)
				found = true;
		}
		if(!found){
			cout << c << endl;
			return 0;
		}
	}
	cout << "None" << endl;
	return 0;
}

Submission status: Runtime Error

Solution code:
import string

for i in string.ascii_lowercase:
    if i not in a:
        print(i)
        break

Submission status: Runtime Error

Solution code:
import string

for i in string.ascii_lowercase:
	if i not in a:
    	print(i)
		break

Submission status: Runtime Error

Solution code:

##ans = ''
##while len(ans) == 0:
##  ans = input().strip()

string = raw_input().strip()
st = list(string)
s = set(st)

if(len(s) == 26):print('None')

else:
    s = sorted(s)
    
    j=0
    for i in range(97,123):
        if(i != ord(s[j])):
            print(chr(i))
            break
        j+=1

Submission status: Runtime Error

Solution code:
myinput=input()
for c in string.ascii_lowercase:
    if c not in myinput:
        print(c)
        break
else:
    print('None')

Submission status: Runtime Error

Solution code:
st = input()
hash_set = set()
for item in st:
    hash_set.add(item)

a = "abcdefghijklmnopqrstuvwxyz"

flag = False
for item in a:
    if item in b:
        print(item)
        break

if flag == False:
    print("None")

Submission status: Runtime Error

Solution code:

ans = ''
while len(ans) == 0:
  ans = input().strip()

##string = list(input().strip())
s = set(ans)

if(len(s) == 26):print('None')

else:
    s = sorted(s)
    
    j=0
    for i in range(97,123):
        if(i != ord(s[j])):
            print(chr(i))
            break
        j+=1

Submission status: Runtime Error

Solution code:
myinput=input()
a=[int(x) for x in myinput.split()]
if abs(a[0]-a[1])<abs(a[0]-a[2]):
    print("A")
else:
    print("B")

Submission status: Runtime Error

Solution code:
myinput=raw_input()
for c in string.ascii_lowercase:
    if c not in myinput:
        print(c)
        break
else:
    print('None')

Submission status: Runtime Error

Solution code:


string = list(input().strip())

s = set(string)

if(len(s) == 26):print('None')

else:
    s = sorted(s)
    
    j=0
    for i in range(97,123):
        if(i != ord(s[j])):
            print(chr(i))
            break
        j+=1

Submission status: Runtime Error

Solution code:
S = str(input)
alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

S.sort()
n = 0
m = 0

for i in range(len(S)):
	if S[n] not in alpha:
		print(S[n])
		break
	n += 1

	if n = len(S) - 1:
		m = 1

if m == 1:
	print('None')

Submission status: Runtime Error

Solution code:
letters = [chr(i) for i in range(97,123)]
string  = input()
for j in range(len(string)) if string[j] in letters:
    letters.remove(string[j])
print(letters[0])

Submission status: Runtime Error

Solution code:
S = str(input)
alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

al = []

n = len(S)
n2 = 0

for i in range(n):
	if S[n2] in alpha:
		al.append(S[n2])
	n2 += 1

m = len(al)
n2 = 0

for j in range(m):
	numi = alpha.index(al[n2])
	del alpha[numi]
	n2 += 1

if len(alpha) == 0:
	print('None')
else:
	print(alpha[0])

Submission status: Runtime Error

Solution code:
S = str(input)
alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

al = []

n = len(S)
n2 = 0

for i in range(n):
	if S[n2] in alpha:
		al.append(S[n2])
	n2 += 1

m = len(al)
n2 = 0

for i in range(m):
	numi = alpha.index(al[n2])
	del alpha[numi]
	n2 += 1

print(alpha[0])

Submission status: Runtime Error

Solution code:
s = input()

a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

for c in s:
    if c in a:
        a.remove(c)

print(a[0])

Submission status: Runtime Error

Solution code:
abc='abcdefghijklmnopqrstuvwxyz'
s=raw_input().strip()
isi=dict()
for l in s:

Submission status: Runtime Error

Solution code:
s2 = "abcdefghijklmnopqrstuvwxyz"
s2 = set(s2)
s = set(raw_input())
if len(s) == 26:
    print "None"
a = list(s2 -s)
print a[0]

Submission status: Runtime Error

Solution code:
import sys

st = list(input())
ls = list(set(st))
ls.sort()
abc = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
for i in range(0,len(abc)):
    if abc[i] != ls[i]:
        print(abc[i])
        sys.exit()
print("None")

Submission status: Runtime Error

Solution code:
S = input()
count = [0]*26 
b = 1 ### NONEフラグ

for i in S:
	count[ord(i)-97] += 1
	
for i in count:
	if count[i] == 0:
		print(chr(97+i))
		b = 0
		break

if b == 1:
	print("None")

Submission status: Runtime Error

Solution code:
S = input()
count = [0]*26 
linenumber = len(S)
b = 1 ### NONEフラグ

for i in range(linenumber):
	count[ord(S[i])-97] += 1
	
for i in count:
	if count[i] == 0:
		print(chr(97+i))
		b = 0
		break

if b == 1:
	print("None")

Submission status: Runtime Error

Solution code:
import sys

DICT = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

d = set(DICT)
s = set(list(sys.stdin.readline().strip()))

print(sorted(list(d-s))[0])

Submission status: Runtime Error

Solution code:
S = input()
count = [0]*26 
linenumber = len(S)
b = 1 ### NONEフラグ

for i in range(linenumber):
	a = ord(S[i])-97
	count[a] += 1
	
for i in count:
	if count[i] == 0:
		print(chr(97+i))
		b = 0
		break

if b == 1:
	print("None")

Submission status: Runtime Error

Solution code:
S = input()
count = [0]*26 
linenumber = len(S)
b = 1 ### NONEフラグ

for i in range(linenumber):
	a = ord(S[i])-ord('a')
	count[a] += 1
	
for i in count:
	if count[i] == 0:
		print(chr(ord('a')+i))
		b = 0
		break

if b == 1:
	print("None")

Submission status: Runtime Error

Solution code:
S = input()
a = [chr(i) for i in range(97, 97+26)]
for s in S:
    if s in a:
        a.remove(s)

print(a[0])

Submission status: Runtime Error

Solution code:
# coding=utf-8
# a,b = map(int, raw_input().split())

# x,a,b = map(int, input().split())
# if abs(x-a) < abs(x-b):
#     print('A')
# else :
#     print('B')


hoge = [0] * 26
a = ord('a')
string = input()
for i in range(len(string)):
    hoge[ord(string[i])-a] = 1

for i in range(26):
    if hoge[i] == 0:
        print(chr(i+a))
        break
    if i == 25:
        print('None')

Submission status: Runtime Error

Solution code:
# coding=utf-8
S = list(raw_input())
S.sort()

alpha = 'abcdefghijklmnopqrstuvwxyz'
c = 0
t = True
for s in S:
    if alpha[c] != s:
        if alpha[c - 1] != s:
            print alpha[c]
            t = False
            break
        else:
            continue
    else:
        c += 1
if t:
    print 'None'