就是nb,不会速来看 摘要:解题思路:注意事项:参考代码:n = int(input())sum_1 = 0t = 0for i in range(10000,999999): i = str(i) p = i …… 题解列表 2022年04月08日 0 点赞 0 评论 460 浏览 评分:0.0
拓扑排序qaqaq 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> //就是一个字符串关系型的拓扑排序 using namespace std; struct node{ int…… 题解列表 2022年04月08日 0 点赞 0 评论 569 浏览 评分:0.0
题目 1093: 字符逆序 摘要:解题思路:①将输入的字符串生成列表②用reverse进行翻转③输出字符注意事项:输出为一行参考代码:li=list(str(input()))if len(li)<=100: li.reverse()…… 题解列表 2022年04月08日 0 点赞 0 评论 450 浏览 评分:0.0
用筛法求之N内的素数 摘要:解题思路:注意事项:参考代码://用筛法求之N内的素数#include<stdio.h>int main(){ int n; int a[1001]; scanf("%d",&n); for(int …… 题解列表 2022年04月08日 0 点赞 0 评论 515 浏览 评分:0.0
编写题解 1209: 密码截获 摘要:解题思路:注意事项:参考代码:while True: try: st=input() ts=st[::-1] s=[] &n 题解列表 2022年04月08日 0 点赞 0 评论 619 浏览 评分:0.0
用math.h库里面的pow函数实现x的n次方效果。求Sn=a+aa+aaa+…+aa…aaa(有n个a)之值,其中a是一个数字,为2。 例如,n=5时=2+22+222+ 摘要:解题思路: S1=2,S2=22+2,S3=222+22+2; S3=S2+2*pow(10,2)+2*pow(10,1)+2*pow(10,0); 得出:S=S+2*pow(10,j)用math.…… 题解列表 2022年04月08日 0 点赞 0 评论 805 浏览 评分:0.0
回文数字(有详解,自认比较好懂,当然代码还可以更简洁) 摘要:解题思路:主函数用for循环i从10000~999999,判断函数judge(i)内,(1)先分五位数和六位数两种情况判断是不是回文数字,是->flag=1,否->直接返回0(这个放到下面的判断中的e…… 题解列表 2022年04月08日 0 点赞 0 评论 508 浏览 评分:0.0
题解 1627: 蓝桥杯算法训练VIP-拦截导弹(JAVA Dilworth定理) 摘要:解题思路:Dilworth定理:偏序集的最少反链划分数等于最长链的长度对于本题来说, 把数列划分成最少的不上升子序列个数等于数列的最长单调增长度使用线段树O(nlogn)使用dp O(n2)注意事项:…… 题解列表 2022年04月08日 0 点赞 0 评论 676 浏览 评分:0.0
C语言训练-求PI*(python版) 摘要:解题思路:注意事项:参考代码:import mathsum = 0i = 1k = 0n = 1while math.fabs(n) >= 10**(-6): #控制循环 sum += n…… 题解列表 2022年04月08日 0 点赞 0 评论 513 浏览 评分:0.0
C语言训练-求具有abcd=(ab+cd)2性质的四位数(python版) 摘要:解题思路:注意事项:参考代码:for i in range(1000,10000): #遍历四位数 a = i//100 #分离出千位和百位 b = i % 100 #分离出十位…… 题解列表 2022年04月08日 0 点赞 0 评论 629 浏览 评分:0.0