Advertisement
jakaria_hossain

codeforce - Middle of the Contest

Mar 7th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define MX 1e9+5
  5. int main()
  6. {
  7. int h1,h2,m1,m2;
  8. scanf("%d:%d",&h1,&m1);
  9. scanf("%d:%d",&h2,&m2);
  10. int h,m;
  11. int sum = h1*60+h2*60+m1+m2;
  12. sum/=2;
  13. h=sum/60;
  14. m=sum%60;
  15. if(h<10)printf("0");
  16. printf("%d:",h);
  17. if(m<10)printf("0");
  18. printf("%d\n",m);
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement