⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simplepoker.m

📁 vigenere密码解密的matlab实现
💻 M
字号:
% This program plays a simplified poker gameclearcards=['ten';'ace';'que';'jac';'kin'];% Convert the cards to numerical values:cvals=text2int1(cards)%% p=300649;% generate a random exponent k with gcd(k,p-1)=1k=khide(p);% Shuffle and hide the cardsshufvals=shuffle(cvals,k,p)% Now reveal the cardsreveal(shufvals,k,p)% Now the advise functionadvise(shufvals,p)% To see that the ace was the only quadratic non-residue modulo p% we do the following test:powermod(cvals,(p-1)/2,p)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -