1. Erste Version: C, Evgeni Pavlidis


/**
* ACM programming Contest WS 08/09
* UVa Status: accepted
* Run Time: 0.060
* @author Evgeni Pavlidis evgenipavlidis@yahoo.de
*/
#include <stdio.h>

int main()
{
int h= 1;
int m =1 ;
double angle;
double offset;

while(1)
{
scanf("%d:%d\n", &h,&m);

if(h == 0 && m == 0)
return 0;

if( h == 0)
h = 12;

angle = 360 - ((h*30 + 0.5*m) - 6*m);

if( angle > 360)
angle = angle - 360;

if( angle > 180 )
angle = 360 - angle;

printf("%1.3f\n", angle);
}
return 0;
}