java--study||O.o 摘要:参考代码:import java.util.Scanner; public class Main { public static void main(String[] args) { …… 题解列表 2024年01月05日 0 点赞 0 评论 550 浏览 评分:10.0
剩下的苹果的角度 摘要:解题思路:对于剩下的苹果,一是剩下都是完整的苹果,那么虫子吃的苹果为y/x;二是剩下的苹果中有一个是虫子没吃完的苹果,那么虫子吃的苹果为y/x+1,困为x/y会取整数,加上1,1是虫子没吃完的那个苹果…… 题解列表 2024年12月13日 2 点赞 0 评论 682 浏览 评分:10.0
C语言 使用while循环解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main ( ){ int n=0 ,x=0 ;&nbs…… 题解列表 2025年01月02日 1 点赞 0 评论 534 浏览 评分:10.0
C++简单解法 摘要:解题思路:此题属于简单题,主要需要知道向上取整的函数ceil(),其他的基本都是基础知识注意事项:参考代码:#include<iostream>#include<cmath>#…… 题解列表 2025年03月03日 0 点赞 0 评论 527 浏览 评分:10.0
编写题解 2772: 苹果和虫子 摘要:解题思路:向上取整注意事项:头文件#include <math.h>不要忘记,可以直接用ceil()函数实现向上取整。由于y和x都是整数,相除时得到的结果也是整型,那么向上取整就无法实现。…… 题解列表 2025年11月08日 1 点赞 0 评论 481 浏览 评分:10.0
2772: 苹果和虫子 摘要:```cpp #include using namespace std; int main() { int x,y,n; cin>>n>>x>>y; if(y%x…… 题解列表 2023年01月11日 0 点赞 0 评论 605 浏览 评分:9.9
题解 2772: 苹果和虫子 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int x,y,n; cin>>n>>x>>y; i…… 题解列表 2023年11月26日 0 点赞 0 评论 339 浏览 评分:9.9
编写题解 2772: 苹果和虫子 摘要:解题思路:无注意事项:无参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double n,x,y; cin>>n>…… 题解列表 2023年11月26日 0 点赞 0 评论 556 浏览 评分:9.9
新手必看,苹果和虫子 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main(){ int n,x,y; scanf("%d %d %d",&n,&x,&y); int e=y/x; i…… 题解列表 2024年11月01日 0 点赞 0 评论 516 浏览 评分:9.9
编写题解 2772: 苹果和虫子(简单题) 摘要:####秒杀题,随便写 ``` #include using namespace std; int main() { int n,x,y; cin>>n>>x>>y; int a…… 题解列表 2023年02月13日 0 点赞 0 评论 607 浏览 评分:9.9