21 lines
619 B
YAML
21 lines
619 B
YAML
|
title: Add all the natural numbers below one thousand that are multiples of 3 or 5.
|
||
|
url: http://projecteuler.net/problem=1
|
||
|
|
||
|
desc: |
|
||
|
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.
|
||
|
Find the sum of all the multiples of 3 or 5 below 1000.
|
||
|
|
||
|
solution: |
|
||
|
Loop numbers from 1-1000 - Use mod to find the multiples
|
||
|
|
||
|
solutions:
|
||
|
solve.php:
|
||
|
desc: Basic solution
|
||
|
language: php
|
||
|
solve.rb:
|
||
|
desc: Basic solution in Ruby
|
||
|
language: ruby
|
||
|
solve.c:
|
||
|
desc: ANSI C solution (Tested with TCC)
|
||
|
language: c
|