题解列表

筛选

优质题解

N以内累加求和(高斯求和)

摘要:解法一:循环累加将输入的数字N循环逐次减1,定义一个变量sum将每次减1的结果累加,输出sum就是所求结果#include <iostream> using namespace std; int ……

题解 1400: 教学楼的楼梯

摘要:参考代码:#include <stdio.h>#include <stdlib.h>int pa(int y){    if(y==1)        return 1;    else if(y==……

python 超简单写法

摘要:解题思路:注意事项:参考代码:x = input()if len(x) < 100:    print(x.lower())#数字太少不让发 这段别管 我随便加点sadadasddsadasdsada……

python 超简单写法

摘要:解题思路:注意事项:参考代码x = input()list = [x]if len(x) < 100:    for i in list:        print(i[::-1])……

迭代法求平方根

摘要:解题思路:先了解什么是牛顿迭代法求平方根;然后就是按正常思路迭代就行。注意事项:求绝对值的函数调用;                int abs(int x) C 库函数 int abs(int x……

成绩排序(多多指教)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>typedef struct students{char name[101];int age;i……