萌新求教,为什么我这个显示unaccepted啊

P1425 小鱼的游泳时间

```cpp #include<stdio.h> int main() { int a,b,c,d,e,f; scanf("%d%d%d%d",&a,&b,&c,&d); if(b<=d) { e=c-a; f=d-b; } else { e=c-a-1; f=d+60-b; } printf("%d %d",e,f); return 0; } ``` 您在17行%d和%d间多加了一个空格
by whc2020 @ 2019-12-04 22:30:52


printf的那一行%d %d中间多了一个空格
by LYIYA @ 2019-12-04 22:38:37


scanf的%d要用空格隔开
by 挚夏 @ 2019-12-08 01:04:37


这是代码 ```c #include<stdio.h> int main() { int a,b,c,d,e,f,g; scanf("%d %d %d %d",&a,&b,&c,&d); if(d<b) { f=d+60-b; e=c-1-a; printf("%d %d",e,f); } else { f=d-b; e=c-a; printf("%d %d",e,f); } return 0; } ```
by 挚夏 @ 2019-12-08 01:06:43


```cpp #include<cstdio> #include<iostream> using namespace std; int main() { int a,b,c,d; cin >> a >> b >> c >> d; int e = (60*c+d)-(60*a+b); int h = e /60; int m = e-60*h; cout << h << " " << m; return 0; } ```
by only76 @ 2020-01-23 11:54:26


|