I hereby claim:
- I am maxint137 on github.
- I am maxint (https://keybase.io/maxint) on keybase.
- I have a public key ASC4gOOftZ_d6AMV-1X-sqV-_yM59KGLaFlvAo5Q3KhYVAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
void Main() | |
{ | |
int N = 8; | |
var nodes = new List<Node>(N + 1); | |
foreach (var n in Enumerable.Range(0, N + 1)) | |
{ | |
nodes.Add(new Node($"n{n}", null)); | |
} | |
nodes[1].setNodes(new Node[] { nodes[2] }); |
void Main() | |
{ | |
var n0 = new Node<string>("n0", null); | |
var n1 = new Node<string>("n1", null); | |
var n2 = new Node<string>("n2", null); | |
var n3 = new Node<string>("n3", null); | |
var n4 = new Node<string>("n4", null); | |
var n5 = new Node<string>("n5", null); | |
var n6 = new Node<string>("n6", null); | |
var n7 = new Node<string>("n7", null); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SVG in HTML</title> | |
<style> | |
body { | |
font-family: cursive; | |
} | |
circle { |
class projecteuler018 | |
{ | |
void parseRawData() | |
{ | |
istringstream iss{ rawdata }; | |
string row; | |
int i{}; | |
while(getline(iss, row, '\n')) | |
{ |
### Keybase proof | |
I hereby claim: | |
* I am maxint137 on github. | |
* I am maxint (https://keybase.io/maxint) on keybase. | |
* I have a public key ASCrzuZRguTE-KNFEFGqp0M6RGR8pYeTYmHA2-wNrYd2nAo | |
To claim this, I am signing this object: |
//https://projecteuler.net/problem=9 | |
void Main() | |
{ | |
int P = 1000; | |
var t = Enumerable.Range(1,P) | |
.Select(a => possibleBC(a, P)) | |
.SelectMany(_ => _) | |
.Where(_=>_.Item2*_.Item2+_.Item3*_.Item3==_.Item1*_.Item1) | |
.First(); |
// https://projecteuler.net/problem=8 | |
var N = @" | |
73167176531330624919225119674426574742355349194934 | |
96983520312774506326239578318016984801869478851843 | |
85861560789112949495459501737958331952853208805511 | |
12540698747158523863050715693290963295227443043557 | |
66896648950445244523161731856403098711121722383113 | |
62229893423380308135336276614282806444486645238749 | |
30358907296290491560440772390713810515859307960866 | |
70172427121883998797908792274921901699720888093776 |
// By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13 | |
// What is the 10 001st prime number? | |
// https://projecteuler.net/problem=7 | |
void Main() | |
{ | |
var knownPrimes = new List<int>(new int[] { 2 }); | |
int N = 3; | |
while (knownPrimes.Count() < 10001) | |
{ |
// 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. | |
// What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? | |
// https://projecteuler.net/problem=5 | |
void Main() | |
{ | |
var bop = new BagOfPrimes(); | |
Enumerable.Range(1, 20) | |
.Select(d=>dividersOf(d).GroupBy(_=>_).Aggregate(bop, (c,n) => c.add(n)).value) | |
.Dump(); |