第四个点鸽了!急急急!
查看原帖
第四个点鸽了!急急急!
1117573
ylswznzs楼主2024/1/28 15:51
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    double a,b;
    cin>>a>>b;
    if (a>=12)a-=12;//改成十二小时制
    cout<<fabs((30*a+0.5*b)-(b*6))<<endl;//30*a,时钟一格是30度,0.5*b,一格中60小格每个0.5度,减去分针一格6度
    return 0;
}
2024/1/28 15:51
加载中...