解决MATLAB不能设置为.m文件默认打开方式

转载:https://blog.csdn.net/yujiaerzong/article/details/77624167

  1. 将下面代码复制保存为 associateFiles.m 文件。
    或者从下面链接下载文件https://ww2.mathworks.cn/matlabcentral/fileexchange/51165-matlab-file-association-fix

  2. 在MATLAB中运行 associateFiles.m 文件,即在命令行中输入 associateFiles 然后 回车。

  3. 步骤2程序运行生成文件 MatlabFileAssocFix.reg 。

  4. 关闭MATLAB,双击运行 MatlabFileAssocFix.reg,会提示添加注册表信息,同意。

可以才去在bin目录中选择以管理员身份运行
MatlabFileAssocFix.reg文件就在matlab安装文件夹的bin目录中

  1. 设置.m文件默认打开程序为MATLAB2016a 完工。

function associateFiles(action, userExtList, fileStr)

% associateFiles(action, extList, fileStr)
%
% Makes a registry files that can be used to set correct file associantions on
% a windows platform. The following MATLAB file extensions are supported:
% .m, .mat, .fig, .mexw32, .mexw64, .p, .mdl, .mdlp, .slx, .mldatx, .req,
% .sldd, .slddc, .slxp, .sltx, .mn, .mu, .muphlp, .xvc, .xvz, .ssc, .mlapp,
% .mlappinstall, .mltbx, .mlpkginstall, .mlprj
%
% INPUT:
% action - optional string.
% * ‘add’ (default) adds/rewrites the MATLAB file association registry
% keys for this version.
% * ‘delete’ deletes the MATLAB file association registry entries for
% ALL versions of MATLAB (including “old style” ones)
% * ‘deleteadd’ is the same as ‘delete’ followed by ‘add’
% extList - optional string or cell array of strings containing the file
% extensions that should be associated with this version. Default is
% all MATLAB file extension (see above).
% fileStr - optional string with the name of the registry file to be written
% (possibly including path). Default is the file
% ‘MatlabFileAssocFix.reg’ in the current directory.
%
% USAGE:
% 1) Run with desired options (see above). A registry file should have been
% created.
% 2) Exit all running instances of MATLAB.
% 3) Make a backup copy of the windows registry if you need to restore the
% changes, see https://support.microsoft.com/en-us/kb/322756
% 4) Double click on the created file (possibly need to enter a password) and
% confirm.
% 5) Restart Windows (or explorer.exe).
% 6) The MATLAB files should now be associated with the MATLAB version that the
% registry file was created in and e.g. m-files should be opened in an
% already running instance of MATLAB.
%
% EXAMPLES:
% * associateFiles(‘deleteadd’) - Makes a registry files that deletes all
% previous MATLAB file association registry keys and write new ones that
% associates all MATLAB files with the MATLAB version that the registry file
% was created in.
% * associateFiles(’’, {’.m’, ‘.mat’, ‘.fig’}, ‘myFile’) - Makes a registry file
% “myFile.reg” that associates m-, mat- and fig-files with the MATLAB version
% that the registry file was created in.
%
% VERSION 1.0

% Defualt input
if (nargin < 1 || isempty(action))
action = ‘add’;
end
if (nargin < 2)
userExtList = {};
end
if (nargin < 3)
fileStr = ‘’;
end
if (~iscell(userExtList))
if (isempty(userExtList))
userExtList = {};
else
userExtList = {userExtList};
end
end

% Sanity check
if (~ischar(action) || (~strcmpi(action, ‘add’) && …
~strcmpi(action, ‘delete’) && ~strcmpi(action, ‘deleteadd’)))
error(‘The action to perform must be ‘‘add’’, ‘‘delete’’ or ‘‘deleteadd’’!’)
end
if (~isempty(userExtList) && ~min(cellfun(@ischar, userExtList)))
error(‘The file extension list must be a string or a cell array of strings!’)
end
if (~ischar(fileStr))
error(‘The file to write to must be a string!’)
end

% Get the currently running MATLAB version
verStr = regexp(version, ‘(\d*?.\d*?.\d*?).’, ‘tokens’);
verStr = verStr{1}{1};
verNum = str2double(regexprep(verStr, ‘(\d*?.\d*)[\x0000-\xffff]’, ‘$1’));
verHex = sprintf(‘x’, str2double(regexprep(verStr, …
'(\d
?).[\x0000-\xffff]’, ‘$1’)), str2double(regexprep(verStr, …
'\d
?.(\d*?).[\x0000-\xffff]*’, ‘$1’)));

% Get 32/64-bit
arch = computer;
switch arch
case ‘PCWIN’
binFolder = ‘win32’;
case ‘PCWIN64’
binFolder = ‘win64’;
end
binPath = fullfile(matlabroot, ‘bin’, binFolder);

% Known MATLAB files with possible DDE actions
fileExtCell = {…
‘fig’ , ‘MATLAB Figure’ , ‘-62’ , …
{‘Open’, ‘uiopen(’’%1’’,1)’} , [] ; …
‘m’ , ‘MATLAB Code’ , ‘-58’ , …
{‘Open’, ‘uiopen(’’%1’’,1)’} , {‘Run’, ‘run(’’%1’’)’} ; …
‘mat’ , ‘MATLAB Data’ , ‘-59’ , …
{‘Load’, ‘load(’’%1’’)’ } , {‘Open’, ‘uiimport(’’%1’’)’}; …
‘mdl’ , ‘Simulink Model’ , ‘-61’ , …
{‘Load’, ‘uiopen(’’%1’’,1)’} , [] ; …
‘mdlp’ , ‘Simulink Protected Model’ , ‘-72’ , …
[] , [] ; …
‘mexw32’, ‘MATLAB MEX’ , ‘-63’ , …
[] , [] ; …
‘mexw64’, ‘MATLAB MEX’ , ‘-63’ , …
[] , [] ; …
‘mn’ , ‘MuPAD Notebook’ , ‘-66’ , …
{‘Open’, ‘mupad(’’%1’’)’} , [] ; …
‘mu’ , ‘MuPAD Code’ , ‘-67’ , …
{‘Open’, ‘uiopen(’’%1’’,1)’} , [] ; …
‘muphlp’, ‘MuPAD Help’ , ‘-68’ , …
{‘Open’, ‘doc(symengine, ‘’%1’’)’} , [] ; …
‘p’ , ‘MATLAB P-code’ , ‘-60’ , …
[] , [] ; …
‘slx’ , ‘Simulink Model (SLX format)’, ‘-73’ , …
{‘Open’, ‘uiopen(’’%1’’,1)’} , [] ; …
‘ssc’ , ‘Simscape Model’ , ‘-65’ , …
{‘Open’, ‘uiopen(’’%1’’,1)’} , [] ; …
‘xvc’ , ‘MuPAD Graphics’ , ‘-69’ , …
{‘Open’, ‘mupad(’’%1’’)’} , [] ; …
‘xvz’ , ‘MuPAD Graphics’ , ‘-70’ , …
{‘Open’, ‘mupad(’’%1’’)’} , [] ; …
‘mlapp’ , ‘MATLAB Application’ , [] , [], [] ; …
‘mltbx’ , ‘MATLAB Toolbox’ , [] , [], [] ; …
‘mldatx’ , ‘Simulink Scenario’ , [] , [], [] ; …
‘req’ , ‘Simulink Requirements Link’ , [] , [], [] ; …
‘sldd’ , ‘Simulink Dictionary’ , [] , [], [] ; …
‘slddc’ , ‘Simulink Dictionary’ , [] , [], [] ; …
‘mlappinstall’, ‘MATLAB Application’ , [] , [], [] ; …
‘mlpkginstall’, ‘MATLAB Support Package’ , [] , [], [] ; …
‘slxp’ , ‘Simulink Protected Model Package’, [] , [], [] ; …
‘sltx’ , ‘Simulink Template’ , [] , [], [] ; …
‘mlprj’ , ‘MATLAB Project’ , [] , [], []};

% Possibly trim list
if (~isempty(userExtList))
fileExtCell = fileExtCell(ismember(fileExtCell(:, 1), …
regexprep(userExtList, ‘.’, ‘’)), 😃;
end

% Make registry file
if (~isempty(fileStr))
% Possibly add file extension
[~, ~, tmp] = fileparts(fileStr);
if (isempty(tmp))
fileStr = [fileStr, ‘.reg’];
end
fid = fopen(fileStr, ‘w’);
else
fid = fopen(‘MatlabFileAssocFix.reg’, ‘w’);
end
if (fid == -1)
error(‘Failed to create registry file’)
end
% Write intial lines
fprintf(fid, ‘%s\r\n\r\n’, ‘Windows Registry Editor Version 5.00’);
fprintf(fid, ‘%s\r\n\r\n’, ‘;FIXES MATLAB FILE ASSOCIATIONS’);

% REMOVE OLD KEYS
explorerKey = [‘HKEY_CURRENT_USER\Software\Microsoft\Windows’, …
‘CurrentVersion\Explorer\FileExts’];
% Iterate over file extensions
for fileExtNo = 1 : size(fileExtCell, 1)
rmKeys = {};
fileExt = fileExtCell{fileExtNo, 1};

% File extension keys
[status, result] = dos([‘reg query HKEY_CLASSES_ROOT /f .’, fileExt, …
’ /k /e’]);
if (~status)
keys = regexp(result, ‘(HKEY_CLASSES_ROOT[\x0000-\xffff]*?)\n’, ‘tokens’);
rmKeys = [rmKeys, keys{:}];
end

% Old style keys without version numbers
if (~strcmpi(fileExt, ‘mexw64’))
% Uses single DDE key for mex files
if (strcmpi(fileExt, ‘mexw32’))
fileExtTmp = ‘mex’;
else
fileExtTmp = fileExt;
end
[status, result] = dos(['reg query HKEY_CLASSES_ROOT /f ', …
fileExtTmp, ‘file /k /e’]);
if (~status)
keys = regexp(result, ‘(HKEY_CLASSES_ROOT[\x0000-\xffff]*?)\n’, …
‘tokens’);
rmKeys = [rmKeys, keys{:}];
end
end

% New style keys with version number
if (strcmpi(action, ‘add’))
% Only remove keys related to this version
[status, result] = dos([‘reg query HKEY_CLASSES_ROOT /f MATLAB.’, …
fileExt, ‘.’, verStr ’ /k’]);
else
% Remove keys related to ALL version
[status, result] = dos([‘reg query HKEY_CLASSES_ROOT /f MATLAB.’, …
fileExt, ‘. /k’]);
end
if (~status)
keys = regexp(result, ‘(HKEY_CLASSES_ROOT[\x0000-\xffff]*?)\n’, ‘tokens’);
rmKeys = [rmKeys, keys{:}];
end

% Explorer keys
[status, result] = dos([‘reg query ‘, explorerKey, ’ /f .’, fileExt, …
’ /k /e’]);
if (~status)
keys = regexp(result, ‘(HKEY_CURRENT_USER[\x0000-\xffff]*?)\n’, ‘tokens’);
rmKeys = [rmKeys, keys{:}];
end

% Write to file
if (~isempty(rmKeys))
fprintf(fid, ‘%s\r\n\r\n’, [’;REMOVES ‘, upper(fileExt), …
’ FILE ASSOCIATIONS’]);
for keyNo = 1 : length(rmKeys)
key = rmKeys{keyNo};
fprintf(fid, ‘%s\r\n\r\n’, [’[-’, key, ‘]’]);
end
end
end

% ADD KEYS
if (~strcmpi(action, ‘delete’))
% Get text Persistent Handler
[status, result] = dos(…
‘reg query HKEY_CLASSES_ROOT.txt\PersistentHandler /ve’);
if (~status)
PersistentHandler = regexp(result, ‘{[\x0000-\xffff]*?}’, ‘match’);
PersistentHandler = PersistentHandler{1};
else
PersistentHandler = ‘’;
end
% DDE call
ddeCall = ‘ShellVerbs.Matlab’;
if (verNum > 8)
% Changed from R2013a
ddeCall = [ddeCall, ‘.’, verStr];
end
% Default icon
defIcon = ‘m’;
if (~exist(fullfile(binPath, ‘m.ico’), ‘file’))
defIcon = ‘’;
end
% Path to MATLAB binary directory with \
binPathStr = regexprep(binPath, ‘\’, ‘\\’);

% Write Shell Open key
key = [’[HKEY_CLASSES_ROOT\Applications\MATLAB.exe\shell\open’, …
‘\command]%r’, ‘@=""’, binPathStr, ‘\MATLAB.exe" “%1"”%r%r’];
fprintf(fid, ‘%s\r\n\r\n’, ‘;ADD SHELL OPEN’);
lines = regexp(key, ‘([\x0000-\xffff]*?)%r’, ‘tokens’);
for lineNo = 1 : length(lines)
fprintf(fid, ‘%s\r\n’, lines{lineNo}{1});
end

% Iterate over file types
for fileExtNo = 1 : size(fileExtCell, 1)
fileExt = fileExtCell{fileExtNo, 1};

% File extension keys
key  = ['[HKEY_CLASSES_ROOT\.', fileExt, ']%r@="MATLAB.', fileExt, '.', ...verStr, '"%r'];
if (strcmpi(fileExt, 'm') && ~isempty(PersistentHandler))% Add some valueskey = [key, '"Content Type"="text/plain"%r', ...'"PerceivedType"="Text"%r'];
end
key = [key, '%r'];
key = [key, '[HKEY_CLASSES_ROOT\.', fileExt, ...'\OpenWithProgids]%r"MATLAB.', fileExt, '.', verStr, '"=""%r%r'];
if (strcmpi(fileExt, 'm') && ~isempty(PersistentHandler))key = [key, '[HKEY_CLASSES_ROOT\.', fileExt, ...'\PersistentHandler]%r@="', PersistentHandler, '"%r%r'];
end
key  = [key, '[HKEY_CLASSES_ROOT\.', fileExt, ...'\Versions\MATLAB.', fileExt, '.' verStr, ']%r"FileVersionMS"=dword:', ...verHex, '%r"FileVersionLS"=dword:00000000%r%r'];% DDE keys
ddeData = fileExtCell(ismember(fileExtCell(:, 1), fileExt), :);
key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...']%r@="', ddeData{2}, '"%r'];
if (~isempty(ddeData{3}))key = [key, '"FriendlyTypeName"="@', binPathStr, '\\matlab.exe', ...',', ddeData{3}, '"%r'];
end
key = [key, '%r'];
% Icon
icon = fileExt;
if (~exist(fullfile(binPath, [icon, '.ico']), 'file'))icon = defIcon;
end
if (~isempty(icon))key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...'\DefaultIcon]%r@="', binPathStr, '\\', icon, '.ico,0"%r%r'];
end
% Shell actions
for shellActionNo = 4:5ddePar = ddeData{shellActionNo};if (~isempty(ddePar))key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...'\Shell\', ddePar{1}, ']%r@="', ddePar{1}, '"%r%r'];key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...'\Shell\', ddePar{1}, '\command]%r@="\"', binPathStr, ...'\\matlab.exe\""%r%r'];key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...'\Shell\', ddePar{1}, '\ddeexec]%r@="', ddePar{2}, '"%r%r'];key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...'\Shell\', ddePar{1},'\ddeexec\application]%r@="', ...ddeCall, '"%r%r'];key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...'\Shell\', ddePar{1},'\ddeexec\topic]%r@="system"%r%r'];end
end% Explorer keys
key = [key, '[', explorerKey, '\.', fileExt, '\OpenWithProgids]%r'];
if (strcmpi(fileExt, 'm'))key = [key, '"m_auto_file"=hex(0):%r'];
end
key = [key, '"MATLAB.', fileExt, '.',  verStr, '"=hex(0):%r%r'];
if (~isempty(ddeData{4}))% Add keykey = [key, '[', explorerKey, '\.', fileExt, ...'\OpenWithList]%r"a"="MATLAB.exe"%r"MRUList"="a"%r%r'];
elsekey = [key, '[', explorerKey, '\.', fileExt, '\OpenWithList]%r%r'];
end
% Write to file
fprintf(fid, '%s\r\n\r\n', [';ADD ', upper(fileExt), ...' FILE ASSOCIATIONS']);
lines = regexp(key, '([\x0000-\xffff]*?)%r', 'tokens');
for lineNo = 1 : length(lines)fprintf(fid, '%s\r\n', lines{lineNo}{1});
end

end

end

% Cloese file
fclose(fid);

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/345980.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

linux 我的世界 跨平台联机,我的世界跨平台联机 PC、手机等平台数据互通

我的世界 ( MineCraft&#xff0c;简称 MC ) 》是一款开放世界沙盒建造游戏&#xff0c;有着超高的自由度&#xff0c;在国内外有着相当高的人气&#xff0c;各年龄层的玩家都非常的喜欢玩。在这次 E3 2017 微软展前发布会上&#xff0c;微软除了公布新主机 Xbox One X ( 原名 …

展望Java的未来:空值类型

尽管有前途的Java值类型不是迫在眉睫&#xff0c;但我偶尔还是喜欢在OpenJDK valhalla-dev邮件列表中打听一下&#xff0c;以了解事情的进展情况并了解即将发生的事情。 诚然&#xff0c;由于我对所用术语的了解有限&#xff0c;并且其中某些消息的底层细节&#xff0c;使我无法…

5G的场景、需求、通信速率

5G三大典型场景 5G有三大典型场景&#xff0c;这三大场景描述了5G的需求也反应了5G与4G的不同&#xff0c;如图所示&#xff0c;三大场景分别为&#xff1a;增强型移动宽带通信&#xff08;eMBB&#xff09;&#xff0c;大规模机器型通信&#xff08;eMTC&#xff09;和超高可…

fceux模拟器linux,超强FC模拟器fceux-2.2.3最新版

超强FC模拟器fceux-2.2.3最新版fceux一款超好用的FC模拟器软件&#xff0c;这个是最新版本的fceux-2.2.3-win32.zip较之早前版本&#xff0c;2.2.2 版本修正部分 bug 并添加了新功能&#xff0c;主要是调试和逆向编译工程的功能。较之早前版本&#xff0c;2.2.1 版本修正大量 b…

linux7禁用ipv6,RHEL 7 及 CentOS 7 彻底禁用IPv6的方法

原标题&#xff1a;RHEL 7 及 CentOS 7 彻底禁用IPv6的方法IPv6在未来可能成为主流&#xff0c;但是就目前而言&#xff0c;很多软件对IPv6的支持并不是很完善&#xff0c;可能导致各类问题。RHEL 7 & CentOS 7 在启动时默认是加载IPv6相关模块的&#xff0c;而禁用IPV6的方…

jpa 分页 排序 过滤_使用JPA标准@ViewScoped通过分页,过滤和排序进行Primefaces DataTable延迟加载...

jpa 分页 排序 过滤Primefaces数据表惰性分页有效&#xff0c;但是在Web上使用Criteria搜索完整示例后&#xff0c;我感到非常沮丧。 所以我混合了来自 http://stackoverflow.com/questions/13972193/how-to-query-data-for-primefaces-datatable-with-lazy-loading-and-pagin…

通信中的backhaul

backhaul 可以翻译成回程,也叫回程线路在现有的无线通信中,backhaul指的是基站和基站控制器之间的链接(一般用户先接入基站,基站再与基站控制器通信,然后进入核心网)。在无线技术中&#xff0c;回程&#xff08;backhaul&#xff09;指的是从信元站点向交换机传送语音和数据流量…

西班牙语言,字母c的发音规则,西语初学者必看:西语29个字母解读

其实西班牙语并没有英语那么复杂的发音规则&#xff0c;除了r这个字母比较难发&#xff0c;其他几乎每一个字母都只有一个特定的音。所以对于西班牙语初学者而言&#xff0c;不用太担心&#xff0c;因为难就退却了。为了更好地帮助初学者进入学习状态&#xff0c;就西班牙语的2…

宏基站、分布式基站、小基站

基站即公用移动通信基站&#xff0c;是无线电台站的一种形式&#xff0c;是指在一定的无线电覆盖区中&#xff0c;通过移动通信交换中心&#xff0c;与移动电话终端之间进行信息传递的无线电收发信电台。 目前&#xff0c;在 5G时代 &#xff0c;“ 宏基站 为主&#xff0c; 小…

OAUTH 2.0授权码授予

OAuth 2.0提供了许多安全性流程&#xff08;或授权类型&#xff09;&#xff0c;以允许一个应用程序访问另一个应用程序中的用户数据。 在此博客中&#xff0c;我们将介绍OAuth 2.0授权&#xff1a;授权代码授权。 首先&#xff0c;有许多定义&#xff1a; 客户端 &#xff…

什么是通信卫星有效载荷(payload)

卫星一般都是由两大部分组成&#xff0c;即有效载荷平台。 有效载荷是指卫星上用于直接实现卫星的自用目的或科研任务的仪器设备&#xff0c;如遥感卫星上使用的照相机&#xff0c;通信卫星上使用的通信转发器和通信天线等&#xff0c;按卫星的各种用途包括&#xff1a;通信转发…

c语言open参数,ifstream :: open()的C类型参数

我必须使用哪种类型的文件名作为ifstream.open()的参数&#xff1f;int main(int argc, char *argv[]) {string x,y,file;string file argv[1];ifstream in;in.open(file);in >> x;in >> y;...使用此代码,我收到以下错误&#xff1a;main.cpp|20|error: no matchi…

单播、广播、组播(多播)

当前的网络中有三种通讯模式&#xff1a;单播、广播、组播(多播)&#xff0c;其中的组播出现时间最晚但同时具备单播和广播的优点&#xff0c;最具有发展前景。 一、单播&#xff08;Unicast&#xff09; 主机之间“一对一”的通讯模式&#xff0c;网络中的交换机和路由器对数…

c语言错误re,c语言malloc之后再realloc的有关问题

C/C code#include #include #include "../Status.h"#define STACK_INIT_SIZE 5 //堆栈初始大小#define STACKINCREMENT 5 //堆栈满之后再增加的大小typedef char *stackelem;typedef struct{stackelem *base,*top;int stacksize;}sqstack;/*------堆栈基本操作------…

struts2面试问题_Struts2面试问答

struts2面试问题Struts2是用Java开发Web应用程序的著名框架之一。 最近&#xff0c;我写了很多Struts2教程 &#xff0c;在这篇文章中&#xff0c;我列出了一些重要的Struts2面试问题以及答案&#xff0c;以帮助您进行面试。 什么是Struts2&#xff1f; Struts1和Struts2之间…

什么是Mesh网络

网络间的通信原理 假设你的名字叫小不点&#xff0c;你住在一个大院子里&#xff0c;你的邻居有很多小伙伴&#xff0c;在门口传达室还有个看大门的李大爷&#xff0c;李大爷就是你的网关。当你想跟院子里的某个小伙伴玩&#xff0c;只要你在院子里大喊一声他的名字&#xff0…

C语言按下列公式计算 求A20的值,2011年全国计算机二级C语言模拟试题及答案(10)...

一、 单项选择题(共30分&#xff0c;每题1分)1. 下列不正确的转义字符是( )A&#xff0e;\\B&#xff0e;\’C&#xff0e;074D&#xff0e;\02. 不是C语言提供的合法关键字是( )A&#xff0e;switchB&#xff0e;cherC&#xff0e;caseD&#xff0e;default3&#xff0e;正确的…

根据谁创建资源授权资源

我的一位同事向我提出了一个关于StackOverflow的有趣问题&#xff0c;并由于我在Spring方面的经验&#xff0c;建议我回答一个很好的问题。 问题是&#xff1a;“ 如何基于使用注释在REST中创建资源的用户来授权特定资源 。” 要点是&#xff1a; 我想做的是创建一个名为Aut…

组播详解

本文转自&#xff1a;http://liuqz926.blog.163.com/blog/static/13448936220091121104233491/ 组播协议允许将一台主机发送的数据通过网络路由器和交换机复制到多个加入此组播的主机&#xff0c;是一种一对多的通讯方式。 IP组播的好处、优势 组播协议与现在广泛使用的单播…

ccf2017除法C语言,CCF考试——201709-5除法

概要问题描述小葱喜欢除法&#xff0c;所以他给了你N个数a1, a2, ⋯, aN&#xff0c;并且希望你执行M次操作&#xff0c;每次操作可能有以下两种&#xff1a;给你三个数l, r, v&#xff0c;你需要将al, al1, ⋯, ar之间所有v的倍数除以v。给你两个数l, r&#xff0c;你需要回答…