6 kyu

Shortest Code : Reading a Book

Description:

Shortest Code : Reading a Book
(Code length limit: 130 chars)

This is the challenge version of coding 3min series. If you feel difficult, please complete the simple version

Task

John reading a book, When he met a word that he had never read, he will read the word spelling, each letter(not for punctuation,number, only letter) takes 1 second; If he have read the word, he will read the word, each word takes 1 second.

Give you a parameter words(Each word is separated by space)

Return a number that how many seconds John can finish reading.

Example

sc("Hello World!")=10  
John read all the word spelling.

sc("black cat and white cat all are cat")=24 
John read the 2nd 'cat' and 3rd 'cat' used 2 seconds.

sc("black Cat and white cat all are cat")=24 
'Cat' and 'cat' are same words,your code should ignore the case

words1="Related Articles: Ruby Environment, CoffeeScript Environment, JavaScript Environment, Python Environment, Haskell Environment, Java Environment, Clojure Environment, .NET Environment."
sc(words1)=86

words2="Related Articles: Ruby Environment, Coffee Script Environment, Java Script Environment, Python Environment, Haskell Environment, Java Environment, Clojure Environment, .NET Environment."
sc(words2)=78 
CoffeeScript is one word, Coffee Script are two words

Code length calculation

In javascript, we can't get the user's real code, we can only get the system compiled code. Code length calculation is based the compiled code.

For example:

If you typed sc=x=>x+1
after compile, it will be:sc=function(x){return x+1;}

Series

Puzzles
Games
Restricted

Stats:

CreatedApr 12, 2016
PublishedApr 12, 2016
Warriors Trained376
Total Skips14
Total Code Submissions1898
Total Times Completed139
JavaScript Completions139
Total Stars10
% of votes with a positive feedback rating93% of 68
Total "Very Satisfied" Votes60
Total "Somewhat Satisfied" Votes7
Total "Not Satisfied" Votes1
Total Rank Assessments5
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • myjinxin2015 Avatar
  • kazk Avatar
Ad