编写题解 2772: 苹果和虫子
摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,x,y,sum=0; scanf("%d %d %d",&n,&x,&y); s……
C语言 使用while循环解决问题
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main ( ){ int n=0 ,x=0 ;&nbs……
2025.7.21刷题记录
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,x,y; scanf("%……
编写题解 2772: 苹果和虫子
摘要:解题思路:向上取整注意事项:头文件#include <math.h>不要忘记,可以直接用ceil()函数实现向上取整。由于y和x都是整数,相除时得到的结果也是整型,那么向上取整就无法实现。……