这题其实可以这样做(用C语言)

P1425 小鱼的游泳时间

不这样做,还怎么做,我真找不出什么~~正经的~~方法了
by 碳六灵 @ 2017-07-27 13:53:02


@[☜闪耀星空☞](/space/show?uid=47959) 反正也我只有这样能做出来
by xyf0513 @ 2017-07-27 13:55:43


好厉害!%%%大佬
by 中2少年雷耶斯 @ 2017-07-27 14:25:28


@[☜闪耀星空☞](/space/show?uid=47959) +1
by Aehnuwx @ 2017-07-28 08:30:31


```cpp #include<cstdio> #include<cmath> #include<iostream> using namespace std; int main() { int a,b,c,d,h,m; scanf("%d %d %d %d",&a,&b,&c,&d); if (d>b) { h=c-a; m=d-b; printf("%d %d",h,m); } else { h=c-a-1; m=60-b+d; printf("%d %d",h,m); } return 0; } 用if判断后其实也可以。 ```
by 微稂_小哥 @ 2017-07-28 19:07:41


```cpp #include <stdio.h> int main() { int a,b,c,d,e,f,s; scanf("%d%d%d%d",&a,&b,&c,&d); s=60*(c-a)+(d-b); printf("%d %d\n",s/60,s%60); return 0; } ```
by pomoke @ 2017-07-28 19:43:49


@[微稂\_小哥](/space/show?uid=51095) 谢谢
by xyf0513 @ 2017-07-28 21:49:34


@[pomoke](/space/show?uid=51283) 谢谢
by xyf0513 @ 2017-07-28 21:50:06


|