#include <iostream>
#include <math.h>
double get_angle(int hour, int minute)
{
if (hour >= 12)
hour -= 12;
double hour_angle = hour / 12. * 360;
hour_angle += minute / 60. / 12 * 360;
double minute_angle = minute / 60. * 360;
double diff_angle = fabs(hour_angle - minute_angle);
if (diff_angle > 180)
diff_angle = 360 - diff_angle;
return diff_angle;
}
int main() {
std::cout << get_angle(10, 47);
// your code goes here
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgoKZG91YmxlIGdldF9hbmdsZShpbnQgaG91ciwgaW50IG1pbnV0ZSkKewoJaWYgKGhvdXIgPj0gMTIpCgkJaG91ciAtPSAxMjsKCWRvdWJsZSBob3VyX2FuZ2xlID0gaG91ciAvIDEyLiAqIDM2MDsKCWhvdXJfYW5nbGUgKz0gbWludXRlIC8gNjAuIC8gMTIgKiAzNjA7Cglkb3VibGUgbWludXRlX2FuZ2xlID0gbWludXRlIC8gNjAuICogMzYwOwoJZG91YmxlIGRpZmZfYW5nbGUgPSBmYWJzKGhvdXJfYW5nbGUgLSBtaW51dGVfYW5nbGUpOwoJaWYgKGRpZmZfYW5nbGUgPiAxODApCgkJZGlmZl9hbmdsZSA9IDM2MCAtIGRpZmZfYW5nbGU7CglyZXR1cm4gZGlmZl9hbmdsZTsKfQoKaW50IG1haW4oKSB7CglzdGQ6OmNvdXQgPDwgZ2V0X2FuZ2xlKDEwLCA0Nyk7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglyZXR1cm4gMDsKfQ==