1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
#include<iostream> using namespace std; int main(){ int s,v; cin>>s>>v;
int hh=8,mm=0,m=s/v+10; if(s%v){ m++; } mm-=m; while(mm<0){ mm+=60; hh--; if(hh<0){ hh+=24; } }
if(hh<10){ cout<<"0"<<hh<<":"; }else cout<<hh<<":"; if(mm<10){ cout<<"0"<<mm<<endl; }else cout<<mm<<endl; return 0; }
|