CT28342

The Crimson First Lone Mark

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Caravans arrive at the tundra station of Whitesnow with crates of banners, and Wheelwright the quartermaster must account for every last one. 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| <= 1597; s contains lowercase English letters.

Example 1:

Input: pmyhqnvprxwaottitsheqjhegsz
Output: m

Example 2:

Input: wwxxdrshvvfqo
Output: d

Example 3:

Input: bnaysrqrnemufqylrpvpzuisnjtevyghrjnqkzmiwwhhdzrewukrizcrgjchitqhnxmuyxzssuadgjmktvhukfflgchcppnjmchkwoacfxakzyyxaicndnnhpg
Output: b

Constraints:

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

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