[编程入门]结构体之成绩统计 屎山代码 只会语法 摘要:解题思路:注意事项:参考代码:class Student: def input(self, student_id, name, score): self.student_i…… 题解列表 2023年12月01日 0 点赞 0 评论 261 浏览 评分:0.0
c代码记录之TOM数(atoi函数用于字符串转数字,单个字符不行) 摘要:代码1:用atoi函数 #include #include int main() { char str[20],num[2];//因为atoi…… 题解列表 2023年12月01日 0 点赞 0 评论 239 浏览 评分:0.0
2901: 查找特定的值 摘要:```#include using namespace std; int n,x,N[100000]; int main(){ cin>>n; for( int i=1;i>N[i];…… 题解列表 2023年12月01日 0 点赞 0 评论 223 浏览 评分:0.0
题解 1099: 校门外的树 摘要: #include using namespace std; int a[100000],c,b,sum,d,e,f; int main(){ cin…… 题解列表 2023年12月01日 0 点赞 0 评论 276 浏览 评分:0.0
2903: 不高兴的津津 摘要:``` #include using namespace std; int school[8],home[8],sum[8],ans; int main(){ for( int i=1;i…… 题解列表 2023年12月01日 0 点赞 0 评论 221 浏览 评分:0.0
编写题解 1039: [编程入门]宏定义之闰年判断 摘要:解题思路:注意事项:参考代码:def LEAP_YEAR(y): return 'L' if (y % 4 == 0 and y % 100 != 0) or y % 400…… 题解列表 2023年12月01日 0 点赞 0 评论 292 浏览 评分:0.0
头疼的工人(实际上就是二进制转换) 摘要:解题思路:创建一个数组存储x转化的二进制,然后好办了注意事项:参考代码:#include<stdio.h> #include<math.h> int main() { int x; sc…… 题解列表 2023年12月01日 0 点赞 0 评论 214 浏览 评分:0.0
求两个数的最大公约数和最小公倍数 摘要:解题思路:两个数的最大公约数可以用辗转相除法来计算,求得最大公约数后,由于最大公约数和最小公倍数的乘积等于这两个数的乘积,所以用两个数的乘积除以最大公约数就是这两个数的最小公倍数。参考代码:#incl…… 题解列表 2023年12月01日 0 点赞 0 评论 199 浏览 评分:0.0
报数问题的思路与代码 摘要:解题思路:使列表形成一个循环,每次报到3(列表的第2位)进行删除注意事项:参考代码:n=int(input())x=[i for i in range(1,n+1)]while n>2: for…… 题解列表 2023年12月01日 0 点赞 0 评论 296 浏览 评分:0.0
题解 2821: 开关灯 摘要: #include using namespace std; int a[100000],m,n; int main() { …… 题解列表 2023年12月01日 0 点赞 0 评论 247 浏览 评分:0.0