#C13420. First Non-Repeated Character
First Non-Repeated Character
First Non-Repeated Character
Given a string s, your task is to determine the first character that does not repeat anywhere in the string. If all characters appear more than once, output None.
This problem requires you to process the string in the order of its characters. The input string can contain letters, digits, punctuation, or special characters. Your solution must output the first character that appears exactly once. If no such character exists, print None
.
Note: If the input string is empty or all characters are repeated, your program should output None
.
inputFormat
The input consists of a single line containing a string s. The string may include spaces and special characters.
outputFormat
Output a single line containing the first non-repeated character. If there is no such character, output None
.
swiss
w