题解列表

筛选

编写题解 1201: 回文数(一)

摘要:解题思路:数字转换为字符串 倒置和判断回文两个函数 注意事项:参考代码:#include "stdio.h"#include "string.h"#include "stdlib.h"void NIZ……

有规律的数列求和

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int main(){    int a=1,b=2,c,n,i=0;    float sum……

自定义函数之数字后移

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include <malloc.h>int main(){ int n,m,*a=NULL,*b=NULL; scanf("%d",&……

K进制数--C语言代码

摘要:解题思路:拿10进制数举例:    1位10进制数    2位10进制数            3位10进制数                          &nbs

小朋友排队——树状数组

摘要:设第k个小朋友应该移动n次,则n=(1-k)个小朋友中身高大于k的人数+((k+1)-n)个小朋友中身高小于k的人数满足前大后小原则例如33 2 10 1 2(前大)2 1 0(后小)故总移动次数为2……

DNA-一种题解

摘要:参考代码:public void dna() {     Scanner sc = new Scanner(System.in);     int n = sc.nextInt();     f……

数据结构单链表的使用

摘要:解题思路:注意事项:参考代码:#include "stdio.h"#include<stdlib.h>typedef int Elemtype;typedef struct LNode //结构定义{……