Begun adding support for a global settings.yml file
This commit is contained in:
@ -15,3 +15,6 @@ solutions:
|
||||
solve.rb:
|
||||
desc: Basic solution in Ruby
|
||||
language: ruby
|
||||
solve.js:
|
||||
desc: Basic solution for NodeJS
|
||||
language: js
|
11
ProjectEuler/005/solve.js
Normal file
11
ProjectEuler/005/solve.js
Normal file
@ -0,0 +1,11 @@
|
||||
for(i=20;true;i+=20) {
|
||||
div = 19;
|
||||
|
||||
while(!(i % div)) {
|
||||
div--;
|
||||
if(div == 0) {
|
||||
console.log( i );
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
@ -21,4 +21,7 @@ solutions:
|
||||
language: ruby
|
||||
solve.c:
|
||||
desc: ANSI C solution (Tested with TCC)
|
||||
language: c
|
||||
language: c
|
||||
solve.js:
|
||||
desc: Javascript solution for NodeJS
|
||||
language: javascript
|
9
ProjectEuler/006/solve.js
Normal file
9
ProjectEuler/006/solve.js
Normal file
@ -0,0 +1,9 @@
|
||||
square = 0;
|
||||
sum = 0;
|
||||
for(num=1;num<101;num++) {
|
||||
square += Math.pow(num,2);
|
||||
sum += num;
|
||||
|
||||
}
|
||||
console.log( Math.pow(sum,2) - square);
|
||||
|
Reference in New Issue
Block a user