CT26597

The First Lone Mark of the Brass inscriptions

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

In the ember dunes of Ashfall, Smith the archivist keeps careful count of the inscriptions. Reorganize the archive shelves, every figure matters. 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| <= 691; s contains lowercase English letters.

Example 1:

Input: cryjbhsgnjuuachxemqtppimzsaztngvpcylvvvkpunpyshqkjlldibyjrcyacfxtaayvrrxxgtenp
Output: d

Example 2:

Input: xjoxrgwavvkbxhriwihtfganfidzgzfldjxcwoebzosdatsjpmiollixmuglafhzppmpdlpkdodkjfjplshjmvnqkvhhezdnwldtxhzqxwmkbfheoaetqvybsqlhthnecfetacycbnbfsfkzritywqehfqzhgpxbgggvetbgkjbeeuzrngvvbwsugbtbwglrkvwyv
Output: -1

Example 3:

Input: hpmrjsphqniawctwyhjddmiadyhhbhmgnfyabxsyiaceeenceyrxpkuvmiyiuvspkdkkxaibfiyzqhpwcceszbsawcztoutmiqkhlbknrtsgnbkaotibkoqjwisxrebsoeyqqzjnzimfqsetgvhkugwbdpjbcfjzftfsarsyudpicezsbtnwvbofboosgcumrriqcxntswmoucunpuuhqgyhnthaurrdcauoluueurrqxlajhzahofdodyseukhlrdtgntvfibgfhzkudykhzlniinzsabxvcceeenpakqzrmyplhetuxuewicmadeyycninznfrwhcqowfd
Output: -1

Constraints:

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

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