题解 2772: 苹果和虫子

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

筛选

数学逻辑简单一点点

摘要:解题思路:首先,我们需要解决一道数学题,可以直接解题,也可以选择代具体的数字,然后把这题逻辑理清楚;然后把它用代码说出来,代码输出结果不是我们理想的结果,我们就根据结果不理想的地方再改改。注意事项:参……

不废话直接秒

摘要:解题思路:floor函数向下取整注意事项:参考代码:import mathn,x,y=map(int,input().split())print(math.floor(n-1/x*y))……

编写题解 2772: 苹果和虫子

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

2025.7.21刷题记录

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

函数嵌套jf语句

摘要:解题思路:注意事项:参考代码:def apple_number(n,x,y): if y>n*x: return ……

2772: 苹果和虫子

摘要:解题思路:每x小时吃掉1个苹果,n个苹果nx小时,nx-y是未吃掉的苹果的用时,(nx-y)/x是剩下的苹果。注意事项:都是提交成功过的,可以直接使用。参考代码:#include<iostrea……

用一个选择语句即可

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

苹果和虫子

摘要:解题思路:注意事项:参考代码:public class Main {    public static void main(String[] args) {    Scanner sc=new Sca……

题解 2772: 苹果和虫子

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

ikun崩溃代码

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