题解列表

筛选

有规律的数列求和

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int n,i;    float a=1.0,b=2.0,j=b/a,t,sum=0;    scanf……

自由下落的距离计算

摘要:解题思路:每次经过的路程均为高度的3倍注意事项:参考代码:m,n=map(int,input().split())c=0for i in range(1,n+1):    m=m/2    c+=3*……

最大公约数与最小公倍数

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); int m =(a<b?a:b); while ……

求最大公约数最小公倍数

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a,b,m,n,i,j;    scanf("%d %d",&a,&b);    m=a<b?b:……

我的很简洁

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdbool.h>bool is_prime(int n) {    if (n <= 1) {        ……

成绩排序(Python实现)

摘要:解题思路:注意事项:参考代码:def sort_students(students):    students.sort(key=lambda x: (x[2], x[0], x[1]))    re……