Advertisement
noshin98

uva 11650-1

Jul 27th, 2016
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int n,i,hh,mm;
  5.     while(scanf("%d",&n)==1)
  6.     {
  7.         for(i=1;i<=n;i++)
  8.         {
  9.             scanf("%d:%d",&hh,&mm);
  10.             hh= 11-hh;
  11.         if(hh <= 0&&mm!=0)   hh=hh+12;
  12.         if(hh<=0&&mm==0)     hh=hh+13;
  13.         if(mm!= 0)
  14.          mm= 60-mm;
  15.         printf("%02d:%02d\n",hh,mm);
  16.  
  17.  
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement