This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
privacy policy: there is none. do not expect any at this time. please do NOT use this app if you do not agree. as the developer, i do not intend to use or distribute any of your information at this time. however, this is a beta program and may have bugs. i/we are not responsible for any data/information you may lose, leak, share using this app. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
namespace AoC2017Day2Part2 | |
{ | |
class Program | |
{ | |
private const string Path = @"C:\Users\...\AoC2017Day2Part2\Input.txt"; | |
static void Main(string[] args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AoC2017Day2Part1 | |
{ | |
class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AoC2017Day1Part2 | |
{ | |
class Program | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AoC2017Day1Part1 | |
{ | |
class Program | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myArr = []; | |
function chunkArrayInGroups(arr, size) | |
{ | |
var s = size; | |
var temp = arr; | |
var sub = []; | |
var div = (arr.length/size); | |
var a = 0; | |
var b = 0; | |
while(a < div) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function titleCase(str) { | |
str = str.toLowerCase(); | |
var arrayOfWords = str.split(" "); | |
var titleArr = []; | |
var returnString = ""; | |
for (var i = 0; i < arrayOfWords.length; i++) { | |
titleArr[i] = arrayOfWords[i].replace(/^\w/, function (c) { | |
return c.toUpperCase(); | |
}); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function palindrome(str) | |
{ | |
str = str.toLowerCase(); | |
str = str.replace(/[\W_]/g, ""); | |
var a = str; | |
var arr = str.split(''); | |
var newArr = arr.reverse(); | |
var b = newArr.join("") | |
console.log("a = " + a + ". b = " + b + "."); | |
if (a == b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, | |
// | |
// a2 + b2 = c2 | |
// For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2. | |
// | |
// There exists exactly one Pythagorean triplet for which a + b + c = 1000. | |
// Find the product abc. | |
let a = 1; | |
let b = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The sum of the squares of the first ten natural numbers is, | |
// 12 + 22 + ... + 102 = 385 | |
// The square of the sum of the first ten natural numbers is, | |
// | |
// (1 + 2 + ... + 10)2 = 552 = 3025 | |
// Hence the difference between the sum of the squares of the first ten natural | |
// numbers and the square of the sum is 3025 − 385 = 2640. | |
// | |
// Find the difference between the sum of the squares of the first one hundred | |
// natural numbers and the square of the sum. |
NewerOlder