头疼的工人(实际上就是二进制转换) 摘要:解题思路:创建一个数组存储x转化的二进制,然后好办了注意事项:参考代码:#include<stdio.h> #include<math.h> int main() { int x; sc…… 题解列表 2023年12月01日 0 点赞 0 评论 542 浏览 评分:0.0
整型数据类型存储空间大小 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int x; short y; printf("%d %d", sizeof(x), …… 题解列表 2023年12月01日 1 点赞 0 评论 736 浏览 评分:5.3
利用数组求解 摘要:解题思路:先将数列中每一项求出来存放在数组中,再求和计算Sn注意事项:我刚开始定义数组写成了"int s[n]={};",报错了,改成“int s[n];”就好了参考代码:#include<stdio…… 题解列表 2023年12月01日 0 点赞 0 评论 426 浏览 评分:9.9
编写题解 1039: [编程入门]宏定义之闰年判断 摘要:解题思路:注意事项:参考代码:def LEAP_YEAR(y): return 'L' if (y % 4 == 0 and y % 100 != 0) or y % 400…… 题解列表 2023年12月01日 0 点赞 0 评论 567 浏览 评分:0.0
2903: 不高兴的津津 ```#includeusingnamespacestd;intschool[8],home[8],sum[8],ans;intmain(){for(inti=1;i>school[i]>>home[i];}for(inti=1;i8){sum[i]=school[i]+home[i];}}for(i 题解列表 2023年12月01日 0 点赞 0 评论 411 浏览 评分:0.0
题解 1099: 校门外的树 #includeusingnamespacestd;inta[100000],c,b,sum,d,e,f;intmain(){cin>>c>>d;for(inti=0;i>e>>f;for(intp=e;p 题解列表 2023年12月01日 0 点赞 0 评论 505 浏览 评分: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 评论 399 浏览 评分:0.0
c代码记录之TOM数(atoi函数用于字符串转数字,单个字符不行) 代码1:用atoi函数#include#includeintmain(){charstr[20],num[2];//因为atoi不能转单个字符,故建议一个数组来盛放单个字符,使其成串intsum=0,n,i,m;while(~scanf("%s", 题解列表 2023年12月01日 0 点赞 0 评论 455 浏览 评分:0.0
[编程入门]结构体之成绩统计 屎山代码 只会语法 摘要:解题思路:注意事项:参考代码:class Student: def input(self, student_id, name, score): self.student_i…… 题解列表 2023年12月01日 0 点赞 0 评论 470 浏览 评分:0.0
c语言函数解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void change(char s[]){ char b[1000]; int cou…… 题解列表 2023年12月01日 0 点赞 1 评论 636 浏览 评分:9.9