Skip to content

Instantly share code, notes, and snippets.

@lullasy
Created September 9, 2012 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lullasy/3683294 to your computer and use it in GitHub Desktop.
Save lullasy/3683294 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(void)
{
int mp, tt = 75;
double score;
cout << "Max Points -> Your Score" << endl;
cin >> mp >> score;
double a = (0.7 * tt * tt * mp);
double b = score - (0.3 * mp);
double time = sqrt(0.1 * ((a / b) - tt * tt));
cout << (int)time << "min " << 60 * (time - (int)time) << "sec" << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment