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 评论 197 浏览 评分: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 评论 242 浏览 评分:0.0
利用数组求解 摘要:解题思路:先将数列中每一项求出来存放在数组中,再求和计算Sn注意事项:我刚开始定义数组写成了"int s[n]={};",报错了,改成“int s[n];”就好了参考代码:#include<stdio…… 题解列表 2023年12月01日 0 点赞 0 评论 125 浏览 评分:9.9
整型数据类型存储空间大小 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int x; short y; printf("%d %d", sizeof(x), …… 题解列表 2023年12月01日 0 点赞 0 评论 330 浏览 评分:5.3
头疼的工人(实际上就是二进制转换) 摘要:解题思路:创建一个数组存储x转化的二进制,然后好办了注意事项:参考代码:#include<stdio.h> #include<math.h> int main() { int x; sc…… 题解列表 2023年12月01日 0 点赞 0 评论 182 浏览 评分:0.0
题解 2840: 向量点积计算 摘要: #include using namespace std; int a[100000],b[100000],sum,c,d,e,f; int main(){ …… 题解列表 2023年12月01日 1 点赞 1 评论 222 浏览 评分:9.9
求两个数的最大公约数和最小公倍数 摘要:解题思路:两个数的最大公约数可以用辗转相除法来计算,求得最大公约数后,由于最大公约数和最小公倍数的乘积等于这两个数的乘积,所以用两个数的乘积除以最大公约数就是这两个数的最小公倍数。参考代码:#incl…… 题解列表 2023年12月01日 0 点赞 0 评论 165 浏览 评分: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 评论 252 浏览 评分:0.0
2905: 最大值和最小值的差 摘要:```#include using namespace std; int N[1000000],n,b; int main(){ cin>>n; for( int i=1;i>N[i];…… 题解列表 2023年12月01日 0 点赞 0 评论 232 浏览 评分:9.9
题解 2821: 开关灯 摘要: #include using namespace std; int a[100000],m,n; int main() { …… 题解列表 2023年12月01日 0 点赞 0 评论 203 浏览 评分:0.0