题解列表
蓝桥杯2023年第十四届省赛真题-更小的数(C++解法)
摘要:解题思路:注意事项:参考代码:#include<iostream>
#include<string>
using namespace std;
int length(string s)
{
……
冒泡排序思想,直接比较大小
摘要:解题思路:使用冒泡排序思想,直接用strcmp()函数比较字符串大小即可参考代码:#include<stdio.h>
#include<string.h>
int main(){
char a……
编写题解 1119: C语言训练-"水仙花数"问题1(循环解决)
摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,c=0; scanf("%d", &n); int t = n; while (n != 0) ……
动态规划思路详解-贪吃的大嘴
摘要:解题思路:注意事项:参考代码:def find_cakes(cakes, m):
# 初始化动态规划数组,dp[i][j]表示前i个小蛋糕中选择若干个,美味度之和为j所需的最小数量
……
编写题解 2791: 计算邮资python
摘要:参考代码:r, s = input().split()
r = int(r)
money = 8
if r > 1000:
money += (r-1000)//500*4
……
编写题解 2790: 分段函数python
摘要:参考代码:N = float(input())
if N >= 0 and N < 5:
print("%.3f" %(-N+2.5))
elif N >= 5 and N < 10:
……