Created
September 9, 2012 08:14
-
-
Save lullasy/3683294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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