#include <iostream>
#include <cmath>
const double PI = 3.14159265358979323846 ;
int main( ) {
double alpha, beta;
// Input angles in radians
std:: cout << "Enter angle α (for the hour hand) in radians ((2π radians corresponds to 12 hours)): " ;
std:: cin >> alpha;
std:: cout << "Enter angle β (for the minute hand) in radians (60 minutes corresponds to 2π radians): " ;
std:: cin >> beta;
// Calculate the angle difference between the hands
double angleDifference = std:: abs ( alpha - beta) ;
// Finding the smaller angle between the hands
if ( angleDifference > PI) {
angleDifference = 2 * PI - angleDifference;
}
// Convert angle to hours and minutes
double hours = ( alpha * 12 ) / ( 2 * PI) ; // Convert alpha to hours
double minutes = ( beta * 60 ) / ( 2 * PI) ; // Convert beta to minutes
// Output results
std:: cout << "Angle between the hands: " << angleDifference << " radians\n " ;
std:: cout << "Number of hours: " << static_cast < int > ( hours) << "\n " ;
std:: cout << "Number of full minutes: " << static_cast < int > ( minutes) << "\n " ;
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+Cgpjb25zdCBkb3VibGUgUEkgPSAzLjE0MTU5MjY1MzU4OTc5MzIzODQ2OwoKaW50IG1haW4oKSB7CiAgICBkb3VibGUgYWxwaGEsIGJldGE7CgogICAgLy8gSW5wdXQgYW5nbGVzIGluIHJhZGlhbnMKICAgIHN0ZDo6Y291dCA8PCAiRW50ZXIgYW5nbGUgzrEgKGZvciB0aGUgaG91ciBoYW5kKSBpbiByYWRpYW5zICgoMs+AIHJhZGlhbnMgY29ycmVzcG9uZHMgdG8gMTIgaG91cnMpKTogIjsKICAgIHN0ZDo6Y2luID4+IGFscGhhOwoKICAgIHN0ZDo6Y291dCA8PCAiRW50ZXIgYW5nbGUgzrIgKGZvciB0aGUgbWludXRlIGhhbmQpIGluIHJhZGlhbnMgKDYwIG1pbnV0ZXMgY29ycmVzcG9uZHMgdG8gMs+AIHJhZGlhbnMpOiAiOwogICAgc3RkOjpjaW4gPj4gYmV0YTsKCiAgICAvLyBDYWxjdWxhdGUgdGh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