1810:输入输出练习之精度控制3 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char ch; int a; float b; double c;&nb 题解列表 2022年04月08日 0 点赞 0 评论 458 浏览 评分:0.0
1951:求平方和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){int a,b,c;scanf("%d%d",&a,&b);c=a*a+b*b;printf("%d",c);re…… 题解列表 2022年04月08日 0 点赞 0 评论 426 浏览 评分:0.0
就是nb,不会速来看 摘要:解题思路:注意事项:参考代码:n = int(input())sum_1 = 0t = 0for i in range(10000,999999): i = str(i) p = i …… 题解列表 2022年04月08日 0 点赞 0 评论 425 浏览 评分:0.0
拓扑排序qaqaq 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> //就是一个字符串关系型的拓扑排序 using namespace std; struct node{ int…… 题解列表 2022年04月08日 0 点赞 0 评论 532 浏览 评分:0.0
题目 1093: 字符逆序 摘要:解题思路:①将输入的字符串生成列表②用reverse进行翻转③输出字符注意事项:输出为一行参考代码:li=list(str(input()))if len(li)<=100: li.reverse()…… 题解列表 2022年04月08日 0 点赞 0 评论 392 浏览 评分:0.0
用筛法求之N内的素数 摘要:解题思路:注意事项:参考代码://用筛法求之N内的素数#include<stdio.h>int main(){ int n; int a[1001]; scanf("%d",&n); for(int …… 题解列表 2022年04月08日 0 点赞 0 评论 485 浏览 评分:0.0
编写题解 1209: 密码截获 摘要:解题思路:注意事项:参考代码:while True: try: st=input() ts=st[::-1] s=[] &n 题解列表 2022年04月08日 0 点赞 0 评论 540 浏览 评分: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 评论 769 浏览 评分:0.0
回文数字(有详解,自认比较好懂,当然代码还可以更简洁) 摘要:解题思路:主函数用for循环i从10000~999999,判断函数judge(i)内,(1)先分五位数和六位数两种情况判断是不是回文数字,是->flag=1,否->直接返回0(这个放到下面的判断中的e…… 题解列表 2022年04月08日 0 点赞 0 评论 469 浏览 评分:0.0
题解 1627: 蓝桥杯算法训练VIP-拦截导弹(JAVA Dilworth定理) 摘要:解题思路:Dilworth定理:偏序集的最少反链划分数等于最长链的长度对于本题来说, 把数列划分成最少的不上升子序列个数等于数列的最长单调增长度使用线段树O(nlogn)使用dp O(n2)注意事项:…… 题解列表 2022年04月08日 0 点赞 0 评论 628 浏览 评分:0.0