百钱白鸡最简单方法 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ printf("cock=0,hen=25,chicken=75\n…… 题解列表 2023年07月08日 0 点赞 0 评论 665 浏览 评分:0.0
题解 2801: 奇数求和 计算非负整数m到n(包括m和n)之间的所有奇数的和,其中,m不大于n,且n不大于300。例如m=3,n=12,其和则为:3+5+7+9+11=35。解题思路:先思考,如何得到一个介于m和n(包括m和n,m≤n)的数呢?没错,就是for(inti=m/*因为是从m开始, 题解列表 2023年07月08日 0 点赞 0 评论 861 浏览 评分:9.9
感谢支持,谢谢你们的支持 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int m,n ,sum=0; cin>>m>…… 题解列表 2023年07月08日 0 点赞 0 评论 520 浏览 评分:9.9
感谢支持,谢谢你们的支持 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int m,n ,sum=0; cin>>m>…… 题解列表 2023年07月08日 0 点赞 0 评论 364 浏览 评分:0.0
2873: 字符串p型编码 摘要:解题思路: 遍历遍历过程中,判断当前字符str[i]是否与下一个字符str[i + 1]相同。如果相同,表示当前字符连续出现,将计数器count加1。如果不相同,表示当前字符不再连续出现,将当前计数值…… 题解列表 2023年07月08日 0 点赞 0 评论 594 浏览 评分:2.0
感谢支持,谢谢你们的支持 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int gg=0,ss=0,bb=0,g,s,b,n…… 题解列表 2023年07月08日 0 点赞 0 评论 449 浏览 评分:0.0
1332: 津津的储蓄计划(C语言数组解法) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main(){ int a[12]; // 每个月的预算 int i; for(i = 0; i < 12;…… 题解列表 2023年07月08日 0 点赞 2 评论 922 浏览 评分:9.9
2813: 药房管理(C语言)(while循环和数组两种解法)数组解法只能得76分 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int pillnum, n; scanf("%d%d", &pillnum, &n); …… 题解列表 2023年07月08日 0 点赞 0 评论 579 浏览 评分:9.9
反差法求解猴子吃桃问题——Python 摘要:解题思路:注意事项:参考代码:def caculate_peach_number(n): left_peaches = 1 day = n while day > 1: …… 题解列表 2023年07月08日 0 点赞 0 评论 770 浏览 评分:9.9
2811: 救援(C语言,重点就是向上取整用ceil()函数,不然的话就会报错) #include#includeintmain(){intn;//屋顶数intx,y;//坐标intnum;//人数scanf("%d",&n);doubles;//计算到原点的距离doublemoment=0;//每去一个屋顶一共要用的时间doublet=0;//一共所需要的时间for(inti=0 题解列表 2023年07月08日 0 点赞 0 评论 706 浏览 评分:9.9