Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int n,i,hh,mm;
- while(scanf("%d",&n)==1)
- {
- for(i=1;i<=n;i++)
- {
- scanf("%d:%d",&hh,&mm);
- hh= 11-hh;
- if(hh <= 0&&mm!=0) hh=hh+12;
- if(hh<=0&&mm==0) hh=hh+13;
- if(mm!= 0)
- mm= 60-mm;
- printf("%02d:%02d\n",hh,mm);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement