#include <stdio.h> int main() { int h1,h2,m1,m2,start,end,ans; while (scanf("%d%d%d%d",&h1,&m1,&h2,&m2)==4) { if (h1==0 && m1==0 && h2==0 && m2==0) break; start=h1*60+m1; end=h2*60+m2; if (start>end) ans=1440-start+end; else ans=end-start; intf("%d\n",ans); } return 0; }
Sunday, April 24, 2016
UVA 11677 - Alarm Clock : Solution
Unknown
Studying at Shahjalal University of Science and Technology, Sylhet.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment