编写题解 3008: 买笔(if语句解法) 摘要:解题思路:若想让笔的数量最大,应优先购买4元的。以4为基准求余:剩1元,则4元钱的笔少买1支,换成1支5元笔;剩2元,则4元钱的笔少买1支,换成1支6元笔;剩3元,则4元钱的笔少买2支,换成1支5元笔…… 题解列表 2024年01月07日 0 点赞 0 评论 124 浏览 评分:0.0
3008: 买笔 买个鸡脖 摘要:解题思路:注意事项:需要想到多种可能参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int x; cin>>x; …… 题解列表 2024年01月07日 0 点赞 0 评论 157 浏览 评分:0.0
蓝桥杯2022年第十三届决赛真题-取模 java哈希 摘要:Map remainders = new HashMap();: 这个HashMap用于存储数字n对每个数字i(从1到m)的余数。 int remainder = n % i;:计算数字n对数…… 题解列表 2024年01月07日 0 点赞 0 评论 211 浏览 评分:0.0
单词统计(小心些数组的空间) 摘要:解题思路:注意题目说单词可重叠,那就以卷子每个元素都为开头一次,往后遍历比较一次注意事项:参考代码:#include<stdio.h> int main() { int n; scanf(…… 题解列表 2024年01月07日 1 点赞 0 评论 160 浏览 评分:0.0
简单计算机器实现(运用双重指针,可以实现多个数之间的运算) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<ctype.h> int m(char **p)//单指针*p里存储的是传过来的指针p的地址,双指针才是值 {…… 题解列表 2024年01月07日 0 点赞 0 评论 177 浏览 评分:0.0
[C语言]c语言考试练习题_排序 摘要:解题思路:规律:每一行的开头数字 ,相邻相同数为一组,下一次重复为间隔得到规律1 2 3\ 1 2 4\ 1 3 4\ 2 3 4统计每一次不出现的数的下标,得到3 ,2 ,1 ,0是一个递减的过程,…… 题解列表 2024年01月07日 0 点赞 0 评论 310 浏览 评分:0.0
蓝桥杯2022年第十三届决赛真题-斐波那契数组 java 摘要: import java.util.Scanner; public class Main { static int arr[] = new i…… 题解列表 2024年01月07日 0 点赞 0 评论 418 浏览 评分:0.0
题解 2777: 计算2的幂 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; int m…… 题解列表 2024年01月08日 0 点赞 0 评论 140 浏览 评分:0.0
2544: N以内累加求和(超简单) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,sum=0; cin>>n; …… 题解列表 2024年01月08日 0 点赞 0 评论 139 浏览 评分:0.0
强制转换,如果不对请纠正谢谢 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {…… 题解列表 2024年01月08日 0 点赞 0 评论 169 浏览 评分:0.0