CS计算机代考程序代写 // From http://en.cppreference.com/w/cpp/chrono

// From http://en.cppreference.com/w/cpp/chrono

#include
#include
#include

unsigned long fibonacci(unsigned n)
{
if (n < 2) return n; return fibonacci(n-1) + fibonacci(n-2); } int main() { auto start = std::chrono::system_clock::now(); std::cout << "f(42) = " << fibonacci(80) << '\n'; auto end = std::chrono::system_clock::now(); std::chrono::duration elapsed_seconds = end-start;
std::time_t end_time = std::chrono::system_clock::to_time_t(end);

std::cout << "finished computation at " << std::ctime(&end_time) << "elapsed time: " << elapsed_seconds.count() << "s\n"; }