蓝桥杯算法训练-P0505 摘要:解题思路:由于存储空间有限,且其限定n的大小;因此只需用后三位非零数值乘于之后的循环值即可;注意事项:参考代码:#include <stdio.h>int main(){ int n,i,f=1…… 题解列表 2022年01月24日 0 点赞 0 评论 441 浏览 评分:0.0
1131: C语言训练-斐波纳契数列 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int n,i;//int a[10],i,j,m;int fun1(int n){ if(n<=2) { retu…… 题解列表 2022年01月24日 0 点赞 0 评论 385 浏览 评分:0.0
python-整数平均值 摘要:解题思路:貌似没有python的题解,加一下哈。注意事项:注意计算后的结果要取整。参考代码:def f(n): A = [int(i) for i in input().strip().…… 题解列表 2022年01月24日 1 点赞 0 评论 500 浏览 评分:0.0
1132: C语言训练-最大数问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int n,i;void fun1(int n){ while(n!=-1) { if(n>i) …… 题解列表 2022年01月24日 0 点赞 0 评论 430 浏览 评分:0.0
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 评论 367 浏览 评分:0.0
python-新生舞会 摘要:解题思路:开始想的是用对象解决,但是查询遍历的时间复杂度将达到O(n2),想想便放弃了,然后采用字典的方法,时间复杂度为O(n)。建立两个字典第一个字典键值为名字,值为性别第二个字典键值为学号,值为性…… 题解列表 2022年01月24日 0 点赞 0 评论 464 浏览 评分: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 评论 327 浏览 评分: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 评论 335 浏览 评分: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 评论 399 浏览 评分:0.0
python-矩阵加法 摘要:解题思路:注意事项:注意题目要求最后一行不要有多余空格参考代码:def f(n,m): A = [[int(j) for j in input().strip().split()] fo…… 题解列表 2022年01月24日 0 点赞 0 评论 539 浏览 评分:0.0