首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
408真题
专业课程
兑换中心
登录
注册
上岸
小王桐学
已上岸西南交通大学人工智能专业硕士
关注
发消息
文章
0
题解
145
发帖
0
笔记
1
Ta的粉丝
218
关注数
0
粉丝数
218
获赞数
304
阅读数
115085
十进制转二进制 题解:C
#include <stdio.h> void Fun(long long n) { if(n > 0) { Fun(n/2); printf("%d",n%2); } } int main() { long long n; ...
P1715
2024年2月5日 21:08
回复 0
|
赞 4
|
浏览 690
交换两个数 题解:C
#include <stdio.h> void Swap(int *p,int *q) { int t = *p; *p = *q; *q = t; } int main() { int a,b; scanf("%d %d",&a,...
P1138
2024年2月5日 20:50
回复 0
|
赞 0
|
浏览 990
求最大最小数 题解:C
#include <stdio.h> #define N 10000 void Max_Min(int a[],int n) { int i,max = 0,min = 0; for(i = 1; i < n; i++) { if(a[min]...
P1163
2024年2月5日 20:42
回复 0
|
赞 1
|
浏览 684
反序输出 题解:C
#include <stdio.h> #include <string.h> void Reverse(char *s) { char *p = s; while(*p != '\0') p++; p--; while(p >= s)...
P1155
2024年2月5日 20:19
回复 0
|
赞 6
|
浏览 880
二叉树遍历 题解:C++
#include <stdio.h> #include <stdlib.h> #define MAX 100 typedef struct node{ char data; struct node *lchild,*rchild; }BiTNode,...
P1161
2024年2月2日 15:58
回复 0
|
赞 3
|
浏览 1.3k
括号的匹配 题解:C有点麻烦
#include <stdio.h> #include <string.h> int main() { int n,i,j = 0,k,a[100],top,flag;//a数组为标记数组,flag为标记 char s[255],tt[255],c...
P1067
2024年2月2日 14:52
回复 0
|
赞 3
|
浏览 1.1k
删除字符串 题解:C
直接选择性输出即可 #include <stdio.h> #include <string.h> #include <stdlib.h> int main() { int i = 0,j; char s[100]; ...
P1026
2024年2月2日 09:18
回复 0
|
赞 6
|
浏览 912
旋转矩阵 - 北航 题解:C解法
还行!!! #include <stdio.h> #define N 10 int Rotate_matrix(int a[][N],int b[][N],int n) { int i,j,k = n-1,h,flag = 1,R = 1000;...
P1377
2024年2月1日 18:23
回复 0
|
赞 0
|
浏览 953
击鼓传花 题解:C++
#include <stdio.h> #include <stdlib.h> typedef struct node{ int data; struct node* next; }LNode,*LinkList; //初始化无头循环链表 ...
P1018
2024年2月1日 16:29
回复 0
|
赞 1
|
浏览 1.3k
字母统计 题解:C
#include <stdio.h> void Statics(char *s) { int i,t[26] = {0}; char *p = s; while(*p != '\0') { if(*p >= 'A' && *p...
P1292
2024年1月31日 22:52
回复 0
|
赞 1
|
浏览 908
最长连续因子 题解:C
easy!!! #include <stdio.h> int main() { int i,n,max = 0,maxi = 2,j,flag; scanf("%d",&n); for(i = 2; i < n; i++) ...
P1020
2024年1月31日 22:40
回复 0
|
赞 0
|
浏览 884
成绩排序2.0 题解:C
#include <stdio.h> typedef struct{ int x; int s; }Student; //排序:先按成绩s从小到大;如果学生的成绩相同,则按照学号的大小进行从小到大排序。 void Sort(Student stu[],i...
P1159
2024年1月31日 22:15
回复 0
|
赞 0
|
浏览 901
查找1 题解:C
#include <stdio.h> void Find(int a[],int n, int b[], int m) { int i,j; for(i = 1; i <= m; i++) { for(j = 1; j <= n; j++)...
P1388
2024年1月31日 21:38
回复 0
|
赞 2
|
浏览 1.0k
字符棱形 题解:
#include <stdio.h> int main() { int n,i,j,k; scanf("%d",&n); for(i = 1; i <= n; i++) //打印上半部分 n行 { for(j = 0; j < ...
P1473
2024年1月31日 21:18
回复 0
|
赞 2
|
浏览 944
最大公约数和最小公倍数 题解:C
#include <stdio.h> //找m与n的最大公约数 int Common_Div(int m,int n) { int t,max = 1; if(m > n) //m为最小的那个数,n为最大的那个数 { t = m; m =...
P1041
2024年1月31日 21:05
回复 0
|
赞 0
|
浏览 837
进制转换3 题解:C
细节!!! #include <stdio.h> #include <string.h> #include <math.h> //先将m进制x数转10进制数 long long Decimal(char x[],int m) { ...
P1422
2024年1月31日 20:19
回复 0
|
赞 1
|
浏览 884
博学楼的阶梯 题解:
#include <stdio.h> int Ladder_Time(int data[],int n) { int i,L = 1,countTime = 0; //L代表楼层号 for(i = 0; i < n; i++) { if(data...
P1005
2024年1月30日 20:09
回复 0
|
赞 0
|
浏览 735
素数 题解:
#include <stdio.h> #include <math.h> //判断素数且个位是否为1 int IsPrimary(int n) { int i; for(i = 2; i <= sqrt(n); i++) if(n %...
P1375
2024年1月28日 22:26
回复 0
|
赞 1
|
浏览 849
查找第K小数 题解:C
数组进行从小到大排序,相同的数必相邻,数出第k个数即所求。 #include <stdio.h> #define N 1000 void Sort(int a[],int n) { int i,j,temp; for(i = 0; i <...
P1383
2024年1月28日 22:15
回复 0
|
赞 1
|
浏览 703
水仙花数 题解:C
#include <stdio.h> int DaffodilNum(int n) { int a,b,c; a = n%10; b = n/10%10; c = n/100; if(a*a*a+b*b*b+c*c*c == n) return...
P1034
2024年1月27日 22:42
回复 0
|
赞 12
|
浏览 1.1k
1
...
5
6
7
8
本科学校:宜宾学院
目标学校:西南交通大学
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!