蓝桥杯算法提高VIP-质因数2(和质因数1一样) 摘要:```c #include int main() { int n; scanf("%d", &n); int i = 0, j = 0, max = n, cnt=0;//和质因数1…… 题解列表 2023年04月20日 0 点赞 0 评论 785 浏览 评分:9.9
进制转换(我的怨种写法) ```c#include#includeintconvert(char*);intoct(int);intmain(){charhex[4]={0};scanf("%c%c%c",hex,hex+1,hex+2);if((hex[0]==48)&&(hex[1]==48)&&(hex[2]==48)) 题解列表 2023年04月20日 0 点赞 0 评论 660 浏览 评分:9.9
最长回文串马拉车算法(Manacher) 摘要:解题思路: 假设输入字符串为 S ① 题目关键点在于 s′ = s ⊕ rev(s) 可以字符串 s 进行一次该公式反转,然后再前后拼接 01 ,生成目标字符串 S …… 题解列表 2023年04月20日 0 点赞 0 评论 1239 浏览 评分:9.9
提货单(c语言) ```c#include#includetypedefstructdata{charmc[100];doubledj;intsl;}prut;intmain(){intn;scanf("%d",&n);getchar();prut*database=(prut*)malloc(n*sizeof(pru 题解列表 2023年04月20日 0 点赞 0 评论 725 浏览 评分:9.9
蓝桥杯算法训练VIP-学生成绩(c语言) ```c#include#includetypedefstructstudent{charname[20];charsex[7];intage;intscore;}stu;voidbubble_sort(stu*data,constintlen);intmain(){intn;scanf("%d", 题解列表 2023年04月20日 0 点赞 0 评论 795 浏览 评分:9.9
编写题解 2808: 买房子 解题思路:程序通过输入流Scanner读取年薪N和房价增长率K,并采用了一个循环结构,每年将年薪积攒到手头的积蓄中,然后判断积蓄是否足够买房子,如果足够则输出年份并退出程序。如果到了第20年仍然买不起房子,则输出Impossible。注意事项:参考代码:importjava.util.Scanner; 题解列表 2023年04月20日 0 点赞 0 评论 847 浏览 评分:9.9
阿尔法乘积(c语言代码) 摘要:```c #include //4018224312 → 4 * 1 * 8 * 2 * 2 * 4 * 3 * 1 * 2 → 3072 → 3 * 7 * 2 → 42 → …… 题解列表 2023年04月20日 0 点赞 0 评论 926 浏览 评分:9.9
字符串输入输出函数(c语言)输出格式有大坑! ```c#includevoidGetReal(char*);voidGetString(char*);intmain(){charreal[1000]={0};charstr[1000]={0};GetReal(real);GetString(str);printf("%s\n", 题解列表 2023年04月21日 0 点赞 0 评论 683 浏览 评分:9.9
最长字符串(c语言代码 简单易理解 有详细注释) ```c#include#includeintmain(){charstr[500]={0};//用来存放输入的字符串gets(str);inti=1;char*pstr[6];pstr[0]=strtok(str,"");//用来分解输入的字符串while(*(pstr+i-1))//strtok结 题解列表 2023年04月21日 0 点赞 0 评论 843 浏览 评分:9.9
字符串比较(c实现strcmp) ```c#includeintmy_strcmp(char*,char*);intmain(){charstr1[100]={0},str2[100]={0};scanf("%s%s",str1,str2);printf("%d",my_strcmp(str1, 题解列表 2023年04月21日 0 点赞 0 评论 905 浏览 评分:9.9