题解 2772: 苹果和虫子

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

2025.7.21刷题记录

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,x,y; scanf("%……

用一个选择语句即可

摘要:解题思路:注意事项:要考虑整个苹果没吃完的情况参考代码:#include<stdio.h>#include<math.h>int main(){ int n,x,y; scanf("%d %d %d"……

ikun崩溃代码

摘要:解题思路:套用if函数判定小数部分舍去,不构成完整的苹果。注意事项:参考代码:#include <stdio.h>int main(){ int n,x,y,z; scanf("%d %d %d",……

解法有很多,多思考进步才会大

摘要:解题思路:注意事项:参考代码: int n,x,y,s,c;   scanf("%d %d %d",&n,&x,&y);   //如果经过y时间%吃一个苹果所需时间x==0  //证明说经过的时间刚好……

题解 2772: 苹果和虫子

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n, x, y; int a = 0; scanf("%d %d %d", &n, &x, &y); i……

ceil和类型转换解决

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){    int n,x,y;    double m;    scanf("%d%……

编写题解 2772: 苹果和虫子

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){    int n,x,y,sum=0;    scanf("%d %d %d",&n,&x,&y);    s……

小白编程11111

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ double x,y; int n; scanf("%d %lf %lf",&n,&x,&y); printf(……