7 kyu
Unique Sum
1,786 of 3,973Alpri Else
Description:
Given a list of integers values, your job is to return the sum of the values; however, if the same integer value appears multiple times in the list, you can only count it once in your sum.
For example:
[ 1, 2, 3] ==> 6
[ 1, 3, 8, 1, 8] ==> 12
[ -1, -1, 5, 2, -7] ==> -1
[] ==> None
Good Luck!
Lists
Logic
Filtering
Fundamentals
Similar Kata:
Stats:
Created | Feb 3, 2016 |
Published | Feb 3, 2016 |
Warriors Trained | 4829 |
Total Skips | 88 |
Total Code Submissions | 14592 |
Total Times Completed | 3973 |
Python Completions | 1786 |
Haskell Completions | 198 |
Ruby Completions | 325 |
JavaScript Completions | 1427 |
C# Completions | 369 |
Total Stars | 41 |
% of votes with a positive feedback rating | 92% of 806 |
Total "Very Satisfied" Votes | 694 |
Total "Somewhat Satisfied" Votes | 89 |
Total "Not Satisfied" Votes | 23 |
Total Rank Assessments | 125 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 1 kyu |
Lowest Assessed Rank | 8 kyu |