CT400

Nyssa and the First Lone Mark

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

At the savanna camp of Amberplain, Nyssa records each verses in a worn leather ledger. The guild wants answers, not guesses. 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| <= 94; s contains lowercase English letters.

Example 1:

Input: yflzxcgmsmxobszmspowti
Output: y

Example 2:

Input: mpwmpaatrqhwtcxsflexgqw
Output: r

Example 3:

Input: xpxrjfcypzfyguteyrmfacqsnwtolomhftksvaurwsirqciabmkxoyekmfuk
Output: j

Constraints:

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

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