6 kyu
Multiples of 3 or 5
52,456 of 448,121jhoffner
Description:
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Finish the solution so that it returns the sum of all the multiples of 3 or 5 below the number passed in.
Note: If the number is a multiple of both 3 and 5, only count it once.
Courtesy of projecteuler.net (Problem 1)
Mathematics
Algorithms
Similar Kata:
Stats:
Created | Mar 21, 2013 |
Published | Mar 28, 2013 |
Warriors Trained | 778355 |
Total Skips | 63389 |
Total Code Submissions | 1267513 |
Total Times Completed | 448121 |
JavaScript Completions | 137453 |
CoffeeScript Completions | 466 |
Ruby Completions | 10932 |
Clojure Completions | 1134 |
Python Completions | 148167 |
C# Completions | 31304 |
Java Completions | 52456 |
Haskell Completions | 3316 |
C++ Completions | 28463 |
Elixir Completions | 857 |
TypeScript Completions | 8621 |
PHP Completions | 9062 |
Swift Completions | 3019 |
Go Completions | 7184 |
Rust Completions | 5381 |
C Completions | 13803 |
R Completions | 734 |
Nim Completions | 98 |
F# Completions | 333 |
Scala Completions | 1189 |
Lua Completions | 640 |
Shell Completions | 632 |
PowerShell Completions | 338 |
Crystal Completions | 69 |
NASM Completions | 75 |
Julia Completions | 272 |
Kotlin Completions | 3359 |
Racket Completions | 147 |
Dart Completions | 2043 |
Factor Completions | 36 |
Prolog Completions | 69 |
Raku Completions | 35 |
COBOL Completions | 53 |
CommonLisp Completions | 155 |
D Completions | 29 |
VB Completions | 64 |
Groovy Completions | 17 |
Total Stars | 3615 |
% of votes with a positive feedback rating | 88% of 40441 |
Total "Very Satisfied" Votes | 31922 |
Total "Somewhat Satisfied" Votes | 7709 |
Total "Not Satisfied" Votes | 810 |