diff --git a/projecteuler/068/main.cpp b/projecteuler/068/main.cpp new file mode 100644 index 0000000..39cb7fa --- /dev/null +++ b/projecteuler/068/main.cpp @@ -0,0 +1,20 @@ +#include + +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::high_resolution_clock::now() - start); + cout << (float)duration.count()/1000 << endl; + return 0; +} diff --git a/projecteuler/068/optimal_5-gon.jpeg b/projecteuler/068/optimal_5-gon.jpeg new file mode 100644 index 0000000..657244b Binary files /dev/null and b/projecteuler/068/optimal_5-gon.jpeg differ