题解列表

筛选

十分简单,一看就会

摘要:参考代码:#include<stdio.h>int main(){ int n,k=0; int num,a[100]; scanf("%d",&n); for(int i=1;i<n;i++){ ……

字符数组遍历解决

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){      char str[100] = { 0 };//初始化字符数组  ……

最大公约数与最小公倍数(用for)循环解决

摘要:解题思路:关于最大公因数:正确的表述应该是最大公因数是能够同时整除 a 和 b 的最大正整数。关于最小公倍数:正确的表述应该是最小公倍数是能够同时被 a 和 b 整除的最小正整数。首先,通过用户输入获……

1169: 绝对值排序(sort)

摘要:解题思路:    核心:l.sort(key=abs, reverse=True)注意事项:    去掉绝对值最大的数参考代码:while True:     l = [int(x) for x i……

无聊的星期六

摘要:#include <stdio.h> typedef struct days {     int  year;     int  month;     int  day; }days; ……

无聊的星期六

摘要:#include <stdio.h> #define LEAP_YEAR(y)  putchar((y % 400 == 0 || y % 4 == 0 && y % 100 != 0)?&#39;……