CT916

Sage's Golden inscriptions

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

It is audit day at the coastal hub of Tidewater. Sage spreads the inscriptions records across the table and picks up a sharp pencil. 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| <= 120; s contains lowercase English letters.

Example 1:

Input: pdztsidupfkdchnnvzoflunjwbgukwpddlrnlcnedglzdulgqxlmoyniicovvwweeewshhhowyrxihwi
Output: t

Example 2:

Input: jeeczw
Output: j

Example 3:

Input: zywojirmlpfjdljupqjflqsruztwqutrvudnfvgqjlwxcijtxjkvgnnb
Output: y

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Sage's Golden inscriptions - EASY Coding Problem | CodeTikki