编写题解 2825: 计算多项式的值,python超简单 摘要:x,n = input().split() x = float(x) n = int(n) # 初始化result和item变量 result = 1.0 item = 1.0 # 使用…… 题解列表 2024年03月27日 0 点赞 0 评论 270 浏览 评分:0.0
编写题解 2833: 金币,python超简单 摘要:def calculate_coins(days): coins = 0 # 初始化骑士收到的金币总数为0 n = 1 # 初始化每天的金币数量为1 day_coun…… 题解列表 2024年03月27日 0 点赞 0 评论 282 浏览 评分:0.0
python代码解决问题 摘要:解题思路:注意事项:参考代码:x1,y1,x2,y2,x3,y3,x4,y4=map(int,input().split())s1=(x2-x1)*(y2-y1)+(x4-x3)*(y4-y3)x_l…… 题解列表 2024年03月27日 0 点赞 0 评论 214 浏览 评分:0.0
利用重载进行多个数字相加 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int add(int a,int b){ return (a+b);}int add(…… 题解列表 2024年03月27日 0 点赞 0 评论 244 浏览 评分:0.0
判断元音字母出现的位置 摘要: #include #include #include /* run this program using the console pauser or add…… 题解列表 2024年03月28日 0 点赞 0 评论 265 浏览 评分:0.0
1866: 三位数反转 (公式简化计算结果)(学习 @弥城猫巷 本题代码中的补零) 摘要:思路: 三位数abc: a×100+b×10+c×1 三位数反转cba: c×100+b×10+a×1 abc - cba = 99×(a-c) cba = abc - 99×(a-c…… 题解列表 2024年03月28日 0 点赞 1 评论 262 浏览 评分:0.0
sort函数妙解数位排序 摘要:解题思路:在sort函数中添加优化的比较函数cmp注意事项:数组要比十万大一点参考代码:#include <iostream> #include<algorithm> using namespac…… 题解列表 2024年03月28日 0 点赞 0 评论 167 浏览 评分:0.0
找第一个只出现一次的字符,不使用复杂函数的简单解法 摘要:题目说了输入的字符串仅有小写字母,那么可以定义一个数据元素个数为26的整型数组,用于记录各个字符出现的次数,出现次数为1的即为答案,没有则输出no ```cpp #include #inclu…… 题解列表 2024年03月28日 1 点赞 0 评论 467 浏览 评分:0.0
Java题解:01背包问题 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args…… 题解列表 2024年03月28日 0 点赞 0 评论 235 浏览 评分:0.0
2875: 回文子串 注意时间限制 摘要:参考代码:s = input() + ' ' ans = [] str1 = "" len_1 = 0 len_2 = 0 while len_2 < len(s) // …… 题解列表 2024年03月28日 0 点赞 0 评论 197 浏览 评分:0.0