- 博客(3)
- 收藏
- 关注
原创 Python实现操作系统的页面置换算法
import copy print("内存块个数为:",end='') a = int(input()) print("请输入页面串(按空格分隔):",end='') b = input().split() c = len(b)*[a*[' ']] e = copy.copy(c) d = copy.copy(c) n = 0 for i in range(len(b)): if b[i] not in d[i]: d[i][n%a] = b[i] n += 1 .
2021-12-07 17:17:53 1882 1
原创 操作系统python代码实现磁头调度算法
print("起始位置为:",end='') b = int(input()) print("进程号为(数字用空格分开):",end='') a = list(map(int,input().split())) print("CSCAN算法的移动方向(1为增,0为减):",end='') yd = int(input()) c = abs(b-a[0]) d = [c] for i in range(len(a)-1): e = abs(a[i + 1] - a[i]) d.appe...
2021-12-03 20:47:03 317
原创 学生信息管理系统(C++)
cpp文件需要与名为‘class.txt’,'student.txt','score.txt'三个文件放在一个文件夹才能正常运行,如图: 代码如下: //使用此程序时需将源程序整个文件夹拖到桌面才可使用 #include <stdio.h> #include <stdlib.h> #include<string.h> #include<process.h> #include<conio.h> #define OK 1 #define .
2021-09-21 10:27:43 248 3
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人