1133: C语言训练-求1+2!+3!+...+N!的和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int n,i,j;long b=0,a=1;int fun1(int n){ a=1; if(n==1) { …… 题解列表 2022年01月24日 0 点赞 0 评论 551 浏览 评分:0.0
python-新生舞会 解题思路:开始想的是用对象解决,但是查询遍历的时间复杂度将达到O(n2),想想便放弃了,然后采用字典的方法,时间复杂度为O(n)。建立两个字典第一个字典键值为名字,值为性别第二个字典键值为学号,值为性别然后查询即可。注意事项:参考代码:deff(n):A=dict()B=dict()foriinran 题解列表 2022年01月24日 0 点赞 0 评论 706 浏览 评分:0.0
A+B for Input-Output Practice (V) 摘要:解题思路:两层for循环,用数组存储相加所需数字注意事项:参考代码:#include<iostream>using namespace std;int main(){ int row, n;//row…… 题解列表 2022年01月24日 0 点赞 0 评论 529 浏览 评分:0.0
2189: diamond(python代码) 摘要:解题思路:注意事项:参考代码:n = int(input()) m = 1 for i in range(n//2): print(' '*((n-m)//2)+'…… 题解列表 2022年01月24日 0 点赞 0 评论 586 浏览 评分:0.0
2190: Little Ke's problem 摘要:解题思路:注意事项:参考代码:n = input() print(f"What is your name? Hello {n}, nice to meet you.")…… 题解列表 2022年01月24日 0 点赞 0 评论 600 浏览 评分:0.0
python-矩阵加法 摘要:解题思路:注意事项:注意题目要求最后一行不要有多余空格参考代码:def f(n,m): A = [[int(j) for j in input().strip().split()] fo…… 题解列表 2022年01月24日 0 点赞 0 评论 802 浏览 评分:0.0
2191: Little Xie's issue(python代码) 摘要:解题思路:注意事项:参考代码:n = input() print('*'*(len(n)+4)) print('* '+n+' *') print…… 题解列表 2022年01月24日 0 点赞 0 评论 686 浏览 评分:0.0
[编程入门]自定义函数之字符类型统计 (C++代码) 摘要:解题思路:用string格式保存题目信息比用数组保存更简单一些注意事项:需要导入string库参考代码:#include<iostream>using namespace std;#include<s…… 题解列表 2022年01月24日 0 点赞 0 评论 562 浏览 评分:0.0
[编程入门]筛选N以内的素数-题解(python代码) 摘要:解题思路: 素数即只有1和它本身两个因子,显然,若数x在(2,根号X)内没有因子,则它在(根号X,x-1)内没有因子,为减少循环(但此题不容易超时,所以可以不用减少循环),计算在(2, int(…… 题解列表 2022年01月24日 0 点赞 0 评论 695 浏览 评分:0.0
python计算数值距离 参考代码:k=[]a=list(map(int,input().split()))t=list(map(int,input().split()))c=t[:a[0]+1]s=list(map(int,input().split()))d=s[:a[1]+1]foriinrange(len(c)):fo 题解列表 2022年01月24日 0 点赞 0 评论 636 浏览 评分:0.0