题解列表

筛选

2010: 头疼的工人

摘要:解题思路:注意事项:参考代码:n = int(input()) m = n lis = [1] while lis[-1]<n:     lis.append(lis[-1]*2) #pri……

2005: 去除空格

摘要:#include <bits/stdc++.h> using namespace std; int main(){     string s;     getline(cin,s);  ……

pthon-蓝桥杯算法提高VIP-乘法运算

摘要:解题思路:程序调试了好多次,这道题用python输出那个乘号时,只占用一个宽度,设置两个宽度的空间,调整对齐格式后依然通过不了,希望大佬有解决方法的话可以留言。注意事项:参考代码:def functi……

python-判断名次

摘要:解题思路:注意事项:参考代码:from itertools import permutations      def f():       rst = tuple(permutations(&#……

C++字符排序(通过字符串输入)

摘要:解题思路:注意到题目中字符串长度比较小,通过选择冒泡等方法应该也能实现,但是本人很懒,因此还是用标准库中的sort函数实现。由于字符数组存储过于麻烦,因此选择通过string类型来读入,再逐个赋值,复……

数组插入处理 python

摘要:解题思路:注意事项:参考代码:a = list(map(int,input().split()))b = int(input())a.append(b)a.sort()for i in a:    p……