Submit | All submissions | Best solutions | Back to list |
SHARELET - Shared Letters |
Determine how many unique letters are shared by two sentences. For example, “this is fun” and “this is not fun” share the letters “thisfun”, for a total of 7 different letters. Note that the space character is not counted.
Input:
Two lines, each of which contains a sentence
Output:
An integer representing how many different letters are shared by the two input sentences
Input | Output |
this is fun this is not fun |
7 |
i love my dog lorem ipsum dolor sit amet |
6 |
strange things are afoot at the circle k what we need is great strength of feet |
11 |
Added by: | Ben Dilts |
Date: | 2012-10-13 |
Time limit: | 5.094s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
hide comments
2012-10-17 11:25:57 Francky
Tutorial, or even to be hidden. |
|
2012-10-17 07:44:44 Swapnil R.Mehta
tutorial... |