... HAVE U TRIED .... AT LEAST 3 TIMES ... OK U CAN SEE THIS ...

Tuesday, December 24, 2013

UVA-11650 :: Mirror Clock

#include <stdio.h>
int main ()
{
     int h , m , i ,n ,x ,a ,b ,y  ;
     scanf ("%d",&n) ;

    for (i=1 ; i<=n ;i++)
          {
     scanf ("%d:%d",&h ,&m) ;

     x = h * 60 + m ;
     y = 1440 - x ;

     a = y / 60  ;
     b = y % 60 ;
     if (a>12)  a = a -12 ;

     printf ("%02d:%02d\n",a ,b) ;

          }
return 0 ;
}