编写题解 1010: [编程入门]利润计算 摘要:解题思路:注意事项:参考代码:I=int(input())if 0<I<=100000: j=I*0.1elif 100000<I<=200000: j=100000*0.1+(I-100…… 题解列表 2023年02月14日 0 点赞 0 评论 535 浏览 评分:0.0
字符串逆序输出(C语言) 摘要:两种方法: 法一:字符串数组 冒泡排序法 #include<stdio.h> #include<stdlib.h> void sort_bubble(char arr[], int len)…… 题解列表 2023年02月14日 0 点赞 0 评论 124 浏览 评分:0.0
编写题解 1688: 数据结构-字符串插入 摘要:解题思路:注意事项:参考代码:a,b,c=input().split()print(a[:int(c)-1]+b+a[int(c)-1:])…… 题解列表 2023年02月14日 0 点赞 0 评论 227 浏览 评分:9.9
Python求解背包问题 摘要:解题思路:注意事项:参考代码:n,m=map(int,input().split())w=[0]*(n+1)v=[0]*(n+1)for i in range(1,n+1): w[i],v[i]…… 题解列表 2023年02月14日 0 点赞 0 评论 202 浏览 评分:0.0
利用整除实现高斯取整 摘要:解题思路:对浮点数进行格式强制转换为整型,而后再除1得到的结果就相当于高斯取整注意事项:参考代码:#include <stdio.h>int main() { float a; int b…… 题解列表 2023年02月14日 0 点赞 0 评论 726 浏览 评分:9.9
开关灯的详细解答 摘要:#include<stdio.h>int main(){ int m,n,i,j; scanf("%d %d",&n,&m); //输出顺序不能错 int a[n+1]; /*第一个人的行为*/ f…… 题解列表 2023年02月14日 0 点赞 0 评论 250 浏览 评分:0.0
2811: 救援(Python) 摘要:解题思路:注意事项:参考代码:from decimal import * n = int(input()) t0 = 0 while True: try: x,y,num=map(in…… 题解列表 2023年02月14日 0 点赞 0 评论 214 浏览 评分:0.0
幂的末尾解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); int i; int r=1; for(i=1;i…… 题解列表 2023年02月14日 0 点赞 0 评论 218 浏览 评分:0.0
魔板(BFS+map去重) 摘要:解题思路:BFS+map去重,用map存储操作序列。 BFS算法通过对当前状态进行操作,并将所有可能的下一状态加入队列,不断扩展状态空间直到找到目标状态。哈希表用于存储操作序列,避免重复搜索相同的状…… 题解列表 2023年02月14日 0 点赞 0 评论 383 浏览 评分:9.9
合法c标识符 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a[30]; int i; int flag=0; gets(a); if((a[0]>='a…… 题解列表 2023年02月14日 0 点赞 0 评论 261 浏览 评分:0.0