苹果和虫子(用if解决这类问题) 摘要: 注意事项: 注意变量类型,有几道题都这个套路 参考代码: ```c #include int main() { int n,x,y; scanf("%d%d%d",&n,&…… 题解列表 2023年09月05日 0 点赞 0 评论 526 浏览 评分:0.0
ceil和类型转换解决 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int n,x,y; double m; scanf("%d%…… 题解列表 2023年07月28日 0 点赞 0 评论 545 浏览 评分:0.0
编写题解 2772: 苹果和虫子 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,x,y,sum=0; scanf("%d %d %d",&n,&x,&y); s…… 题解列表 2024年12月05日 0 点赞 0 评论 542 浏览 评分:0.0
2025.7.21刷题记录 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,x,y; scanf("%…… 题解列表 2025年07月21日 0 点赞 0 评论 420 浏览 评分:0.0
2772: 苹果和虫子 解题思路:注意事项:参考代码:#includeusingnamespacestd;intmain(){intn;cin>>n;intx;cin>>x;inty;cin>>y;cout 题解列表 2026年09月12日 0 点赞 0 评论 150 浏览 评分:0.0
苹果和虫子 摘要:解题思路:注意事项:参考代码:public class Main { public static void main(String[] args) { Scanner sc=new Sca…… 题解列表 2023年04月13日 0 点赞 0 评论 633 浏览 评分:0.0
题解 2772: 苹果和虫子 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n, x, y; int a = 0; scanf("%d %d %d", &n, &x, &y); i…… 题解列表 2023年03月01日 0 点赞 0 评论 544 浏览 评分:0.0
2772: 苹果和虫子 解题思路:每x小时吃掉1个苹果,n个苹果nx小时,nx-y是未吃掉的苹果的用时,(nx-y)/x是剩下的苹果。注意事项:都是提交成功过的,可以直接使用。参考代码:#includeusingnamespacestd;intmain(){intn, 题解列表 2026年05月23日 0 点赞 0 评论 202 浏览 评分:0.0
解法有很多,多思考进步才会大 摘要:解题思路:注意事项:参考代码: int n,x,y,s,c; scanf("%d %d %d",&n,&x,&y); //如果经过y时间%吃一个苹果所需时间x==0 //证明说经过的时间刚好…… 题解列表 2023年02月27日 0 点赞 0 评论 541 浏览 评分:0.0
函数嵌套jf语句 摘要:解题思路:注意事项:参考代码:def apple_number(n,x,y): if y>n*x: return …… 题解列表 2026年04月26日 0 点赞 0 评论 292 浏览 评分:0.0