洛谷P5741 C语言
时间: 2023-10-30 09:22:24 浏览: 353
C语言中##的用法总结
5星 · 资源好评率100%
洛谷P5741是一道C语言题目,具体的代码如下:
```c
#include<stdio.h>
int main() {
int m, t, s;
scanf("%d%d%d", &m, &t, &s);
if (t == 0)
printf("0");
else {
if (m - s / t >= 0) {
if (s % t == 0)
printf("%d", m - s / t);
else
printf("%d", m - s / t - 1);
} else
printf("0");
}
return 0;
}
```
该代码是一个简单的计算题目,根据输入的m、t、s的值进行一系列的计算,并输出结果。具体的计算过程请参考引用中的代码。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [洛谷p5709C语言](https://blog.csdn.net/m0_64395922/article/details/122877332)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Java与C语言混合开发技术](https://download.csdn.net/download/milk416666/88249349)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [洛谷 P1048采药 C语言](https://blog.csdn.net/dhmhhhh/article/details/119062579)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文