#include <iostream>
using std::cout;
using std::endl;

#include "problems/Factory.h"
#include "util/Timer.h"
using util::Timer;

int main(int argc, char **argv) {

  auto problem = problems::Factory::create(1);

  Timer t;

  t.start();
  problem->solve();
  t.stop();

  cout << problem->answer() << endl;
  cout << "Time elapsed: " << t << endl;

  return 0;
}

#include <iostream>
using std::cout;
using std::endl;

#include "problems/Factory.h"
#include "util/Timer.h"
using util::Timer;

int main(int argc, char **argv) {

  auto problem = problems::Factory::create(1);

  Timer t;

  t.start();
  for (int i = 0; i < 1000000; ++i)
    problem->solve();
  t.stop();

  cout << problem->answer() << endl;
  cout << "Time elapsed: " << t << endl;

  return 0;
}

--- 
+++ 
@@ -13,8 +13,7 @@
   Timer t;
 
   t.start();
-  for (int i = 0; i < 1000000; ++i)
-    problem->solve();
+  problem->solve();
   t.stop();
 
   cout << problem->answer() << endl;
Make apps/pe only run a problem once
