为啥是零分

P5707 【深基2.例12】上学迟到

你要不看看你的输出都是什么玩意?
by WhiteSunFlower @ 2022-09-19 16:33:10


```cpp char c; ``` 你拿 ```cpp %d ``` 输出?
by WhiteSunFlower @ 2022-09-19 16:34:49


用cout它不香吗。。。
by RE_Prince @ 2022-09-19 17:26:46


**少年不知c++好,错把stdio.h当成宝**
by qwertyly @ 2023-02-10 21:58:49


```c++ #include <stdio.h>//头文件 int main() { int s,v,t;//先设速度时间和路程 scanf("%d%d",&s,&v);//输入 if(s % v == 0){t = s / v + 10;}//if表达式 else{t = s / v + 10 + 1;} int n = 8 * 60 + 24 * 60; n = n - t; if(n >= 24 * 60){n = n - 24 * 60;}//判断是否超过一天 int a = n / 60;//算小时 int b = n % 60;//算分钟 if(a < 10)//第一个 { if(b < 10)//第二个 { printf("0%d:0%d",a,b); } else//第三个 { printf("0%d:%d",a,b); } } else//第四个 { if(b < 10)//第五个 { printf("%d:0%d",a,b); } else//第六个 { printf("%d:%d",a,b); } } return 0; }
by qwertyly @ 2023-02-11 20:58:21


现在,我感觉我这个代码和傻子一样
by qwertyly @ 2023-09-16 13:20:48


|