CT1907

Wasim and the Vermilion letters

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Legend says the vault under the honeycomb cliffs of Beeswick opens only for a perfect tally of letters. Wasim means to find out. Task: Print the first character of s that occurs exactly once. If none exists, print -1. Input format: One line with a single lowercase string s. Output format: Print a single character or -1. Constraints: 1 <= |s| <= 143; s contains lowercase English letters.

Example 1:

Input: xkweqszelzltxrzasfmtpjwpfjfflfjfobflwtpgaosapjnqizvhnxyxfcqgvdwbyggxerpohqw
Output: k

Example 2:

Input: qnmnpztdbilnqivrysrearvxxyhdtrsnkvmwhbsvtndpekuwvnxsqepluoskhluktgpzbs
Output: a

Example 3:

Input: wdzhjxczfiqdexwepldbdgykcatjuowwoxhkerqektmxxjxctsjbfenhrtvxfukixxochsqzlhvmbtxlmjelldyvplbbqelbqxjgqovwdqdifvsq
Output: a

Constraints:

1 <= |s| <= 143; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.