fork download
  1. typedef long long ll;
  2. #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  3. #include <iostream>
  4. #include<algorithm>
  5. #include<set>
  6. #include<map>
  7. #include <vector>
  8. #include <deque>
  9. #include <queue>
  10. #include <stack>
  11. #include<cmath>
  12. #include<iomanip>
  13. #include <cctype>
  14. #include<string>
  15. using namespace std;
  16.  
  17. template<class T, class U> T GCD(T a, U b) { return(!b ? a : GCD(b, a % b)); }
  18. template<class T, class U> T LCM(T a, U b) { return(a * b) / GCD(a, b); }
  19.  
  20. int main()
  21. {
  22. IOS;
  23. string s;
  24. cin >> s;
  25. int h = s[0] - 48;
  26. h *= 10;
  27. h += (s[1] - 48);
  28. int m = s[3] - 48;
  29. m *= 10;
  30. m += (s[4] - 48);
  31. cout << fixed << setprecision(6);
  32. cout << float((30.0 * h) - ((11.0 / 2) * m));
  33.  
  34.  
  35.  
  36. }
  37.  
Success #stdin #stdout 0.01s 5516KB
stdin
Standard input is empty
stdout
-4881.000000