Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include <cstdio>
int main(){
int hour(0), minute(0); scanf("%d:%d", &hour, &minute);
double first = 30 * (hour%12) + minute/2.0;
double second = 6 * minute;
printf("%.10lf %.10lf", first, second);
return 0;
}
Copy The Code &
Try With Live Editor
Input
12:00
Output
0 0
Demonstration
Codeforces Solution-B. Depression-Solution in C, C++, Java, Python