#include <stdio.h> #include <stdlib.h> #include<math.h> int main() { int s,v,h,m; scanf("%d%d",&s,&v); int t=480-10-s/v; if (t>=0) { m=t%60; h=t/60; } else { t=t%(24*60)+24*60; m=t%60; h=t/60; } printf("%02d:%02d",h,m); return 0; }