Clock Math | Toph

Please anyone help me to work out this problem. Here is the problem link…

Below is my solution. I can’t understand why i am getting error and some of the test cases are skipped.
int h,m;
cin>>h>>m;
double angle;
angle = (360-(h*30)+((m/5.0)30)-(m30)/60.0);
cout<<fixed<<setprecision(7)<<angle<<endl;