#K82627. Convert Snake Case to Camel Case
Convert Snake Case to Camel Case
Convert Snake Case to Camel Case
You are given a string in snake_case format. Your task is to convert it to camelCase. In camelCase, the first word is in lowercase and each subsequent word starts with an uppercase letter. Underscores should be removed.
For example, if the input string is this_is_a_test
, the output should be thisIsATest
. Note that consecutive underscores or leading/trailing underscores may produce empty segments and should be handled correctly.
The conversion can be described by the formula:
\[
\text{result} = w_0 + \sum_{i=1}^{n} Capitalize(w_i)
\]
where w_i
are the words obtained by splitting the input on the underscore character _
.
inputFormat
The input consists of a single line containing a non-empty snake_case string.
outputFormat
Output the corresponding camelCase string.
## samplehello
hello