CT27141

The First Lone Mark of Cindercrag

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The clerk Hema has been asked to certify the cargo before shipping. On the desk lies a long table of riddles readings. 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| <= 842; s contains lowercase English letters.

Example 1:

Input: rujoxmqrurmshqpagkmce
Output: j

Example 2:

Input: tdqeqhbhkajsnfozjykmzporyehszkwafdmmdlslruypcoundjgwjtdufrbrzudxuvwbynlhlpakiprlemqadmxvckvmcprxybltsczqyuyrnidaziummkqwoewonfjkpoiigtvhzbntzrptgpdqhxattmsckcubryphyhrpysvflsfloeaoanlidkhmdiwjajioeropticaqdgwkxjtlszztqhcxwrimexwrelkzfalsyducnulacolpishs
Output: -1

Example 3:

Input: smqhauqqvpfccwjjqtsigckkxdsuwqjcyibccgkmbxeupaejblikramoguabur
Output: h

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The First Lone Mark of Cindercrag - EASY Coding Problem | CodeTikki