【洛谷P1425 小鱼的游泳时间--100分】

来源:互联网 发布:淘宝自己的评论看不见 编辑:程序博客网 时间:2024/05/01 15:16
#include<iostream>#include<math.h>#include<cstdio>using namespace std;int main(){    int a,b,c,d,e,f;    cin>>a>>b>>c>>d;    if (d>=b)    {     e=c-a;     f=d-b;     cout<<e<<" "<<f;    }    else if (d<b)    {     e=c-a-1;     f=d+60-b;     cout<<e<<" "<<f;    }    return 0;}