出现次数超过一半的数(C语言版) 摘要:解题思路:这里要一个存储个数的数组b,然后把各个数的个数放到b中。注意事项:注意这里加减50的原因是,数组的下标没有负数,其他的就没啥了。参考代码:#include<stdio.h>int main(…… 题解列表 2023年01月30日 0 点赞 0 评论 745 浏览 评分:9.9
C语言训练-角谷猜想(水题) 摘要:```c #include int main(){ int n,i,m; scanf("%d",&n); do{ if(n%2==0){ printf("%d/2=…… 题解列表 2023年01月30日 0 点赞 0 评论 574 浏览 评分:0.0
C语言训练-舍罕王的失蒜(超级简单) ```c#includeintmain(){inti;unsignedlonglongsum=0,n=1;//关键for(i=0;i 题解列表 2023年01月30日 1 点赞 0 评论 850 浏览 评分:9.9
纪念品分组,左右两端向中间靠拢(C语言代码) 摘要:解题思路:先将价格进行排序,然后考虑分组,分组用左右两边向中间靠拢注意事项:排序用qsort耗时短;靠拢到最后可能还会多出一个,记得讨论参考代码:#include <stdio.h> #includ…… 题解列表 2023年01月30日 0 点赞 0 评论 950 浏览 评分:9.9
ikun崩溃代码 摘要:解题思路:注意事项:参考代码:# include <stdio.h>int main(){ int f; float c; scanf("%d",&f); c =(f-32)…… 题解列表 2023年01月30日 0 点赞 0 评论 489 浏览 评分:0.0
向量点积计算 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i,ans=0; scanf("%d",&n); int a[n]; int b[n]; for(i…… 题解列表 2023年01月29日 0 点赞 0 评论 834 浏览 评分:6.0
1003密码破译 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char arr[20]={0};//定义一个随机长度的字符串数组 sc…… 题解列表 2023年01月29日 0 点赞 2 评论 448 浏览 评分:9.3
1007: [编程入门]分段函数求值(简单易懂) 摘要:```c #include int main() { int x,y; scanf("%d", &x); if (x < 1) { y = x; } else if…… 题解列表 2023年01月29日 0 点赞 0 评论 575 浏览 评分:9.9
编写题解 2839: 石头剪刀布 摘要:解题思路:m[i]表示A,t[i]表示Bq表示A胜得次数,W表示B胜得次数同时注意输入完AB各自的出题规律后要循坏填补后面的对决,即创建一个满足N轮的对局数组注意事项:参考代码:a#include<s…… 题解列表 2023年01月29日 0 点赞 0 评论 912 浏览 评分:9.9
]自定义函数之数字后移 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d", &n); int i = 0; int m = 0; int a[100]…… 题解列表 2023年01月29日 0 点赞 0 评论 584 浏览 评分:0.0