CPC '21 Contest 1 P0 - AQT and Alphabet

View as PDF

Submit solution


Points: 3
Time limit: 2.0s
Memory limit: 256M

Authors:
Problem type

For Valentine's day, AQT wants to give a letter to his valentine. He currently has a string S of 5 lowercase letters and wants to give one to his valentine that isn't present in the string. Help him find one!

Constraints

|S| = 5

S consists only of the letters abcdefghijklmnopqrstuvwxyz (lowercase English alphabet).

Input Specification

The first line contains the string S.

Output Specification

Output a letter that AQT does not have.
Note: If there are multiple letters that meet this criterion, output the one with lowest alphabetical order. See sample explanation for more details.

Sample Input

zdeac

Sample Output

b

Explanation

The letters AQT doesn't have are bfghijklmnopqrstuvwxy. Out of all of them, b is the one that comes first in the alphabet.


Comments


  • 1
    CodingCrab_520  commented on Nov. 2, 2022, 10:26 p.m. edited

    Here this will save y'all some time

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

    edit: nvm u don't need this


    • 1
      John  commented on Nov. 4, 2022, 7:06 p.m.

      Thanks anyway