Solved 068 by hand
This commit is contained in:
20
projecteuler/068/main.cpp
Normal file
20
projecteuler/068/main.cpp
Normal 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;
|
||||
}
|
||||
BIN
projecteuler/068/optimal_5-gon.jpeg
Normal file
BIN
projecteuler/068/optimal_5-gon.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 276 KiB |
Reference in New Issue
Block a user