题解列表

筛选

蓝桥杯算法训练-P0505

摘要:解题思路:由于存储空间有限,且其限定n的大小;因此只需用后三位非零数值乘于之后的循环值即可;注意事项:参考代码:#include <stdio.h>int main(){    int n,i,f=1……

python-整数平均值

摘要:解题思路:貌似没有python的题解,加一下哈。注意事项:注意计算后的结果要取整。参考代码:def f(n):       A = [int(i) for i in input().strip().……

1132: C语言训练-最大数问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int n,i;void fun1(int n){    while(n!=-1)    {        if(n>i)       ……

python-新生舞会

摘要:解题思路:开始想的是用对象解决,但是查询遍历的时间复杂度将达到O(n2),想想便放弃了,然后采用字典的方法,时间复杂度为O(n)。建立两个字典第一个字典键值为名字,值为性别第二个字典键值为学号,值为性……

A+B for Input-Output Practice (V)

摘要:解题思路:两层for循环,用数组存储相加所需数字注意事项:参考代码:#include<iostream>using namespace std;int main(){ int row, n;//row……

2189: diamond(python代码)

摘要:解题思路:注意事项:参考代码:n = int(input()) m = 1 for i in range(n//2):     print(&#39; &#39;*((n-m)//2)+&#39……

2190: Little Ke&#039;s problem

摘要:解题思路:注意事项:参考代码:n = input() print(f"What is your name? Hello {n}, nice to meet you.")……

python-矩阵加法

摘要:解题思路:注意事项:注意题目要求最后一行不要有多余空格参考代码:def f(n,m):       A = [[int(j) for j in input().strip().split()] fo……