CT22951

The ribbons First Lone Mark Puzzle

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the cotton rows of Whitewick, Petr studies rows of ribbons entries. One clean number will settle the guild's oldest argument. 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| <= 1531; s contains lowercase English letters.

Example 1:

Input: lrcuvfweripmmettiickekwnpgntporerdhzgylftntjpohewkwlwkzzjksnzskckolbacdgltifurdwiqvmpbjkzocychkywptmtwafrqdwtumtzyytqzbaczcfghnchodrbjapowhmpaqzynwphiweamsuncnnmdkuggekguqqsfgjnyhqwssdggajnokhgdnadqrkzkrdtdtlghzqwlhjmyjcksrkojhdxnxbbkoxvuagovvpen
Output: -1

Example 2:

Input: uvshmvzcymsbzzphrjjwcyyyjcugrtklmpxwtakacnsfwnvpvswxbjrcebjtbjzlgdrbwybnxsmuzqpnarrrfhxhleoemjyihjizropenruhsufwyllryldsatsfycekcxmgnttheeitbhdaaqdozqtqrsxgcyckkpermsvzwlesgejbxdcbpxdgczgbnrsoppytdkhpxhmsgkayxktigoggazceerwzqzgtctturoingbmugnxnmydfcrmsrhotpigsajfywwovjzjevcnduifmezeosbcsvwudcxvpgbonqalytfolafhiizjckiqnforzibgzvlaestxysxlntdxfwokccthcicvhlqpfgkgtytuqhyijfoswqpicyxkftqynzwqilonpqjijulvubqnbkylqrzekvvtcczfndiobkwlfeemsssitsrdcotzhkvkewcqqnjiytvajhajraypaiovjbfrvbhbmyvyrzdbzrttefnngpfam
Output: -1

Example 3:

Input: fltdnxepirybadvwrdcrnbwwhcnzkkcdplepfanbpysfodlgbcscatvzejzzw
Output: x

Constraints:

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

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