Solved 068 by hand

This commit is contained in:
2021-11-13 13:55:57 +01:00
parent e1ed7960aa
commit d06da3219a
2 changed files with 20 additions and 0 deletions

20
projecteuler/068/main.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include <bits/stdc++.h>
using namespace std;
int main(){
cout << "Hello this is Patrick" << endl;
auto start = chrono::high_resolution_clock::now();
// Solved it by hand, added photo of the visual solution to the folder
/* The solution can be derived by observing that the outer most layer must contain the highest numbers
and we can derive that that all rows must add up to 14, from which the configuration then follows
*/
cout << 6531031914842725 << endl;
auto duration = chrono::duration_cast<chrono::milliseconds>(chrono::high_resolution_clock::now() - start);
cout << (float)duration.count()/1000 << endl;
return 0;
}