首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
Tyu0871
2026年3月16日 15:03
加密算法 题解:大力出奇迹
P1014
回复 0
|
赞 1
|
浏览 83
#include<bits/stdc++.h> using namespace std; int main(){ string ss; getline(cin,ss); for(int i=0;i<ss.size();i++){//优雅的if else if(ss[i]>='A'&&ss[i]<='W'||ss[i]>='a'&&ss[i]<='w') ss[i]+=3; else if(ss[i]=='X') ss[i]='A'; else if(ss[...
ez008
2026年3月14日 00:03
加密算法 题解:
P1014
回复 0
|
赞 11
|
浏览 177
#include <iostream> using namespace std; int main() { string s; while(getline(cin,s)){ for(int i=0;i<s.length();i++){ if(s[i]>='a'&&s[i]<='z'){ s[i]=((s[i]-'a'+3)%26)+'a'; }e...
太一
2026年3月13日 21:54
加密算法 题解:
P1014
回复 0
|
赞 0
|
浏览 72
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int main() { string s; getline(cin, s); for (int i = 0;i < s.length();i++) { &...
ZeroQi_404
2026年3月11日 23:43
加密算法 题解:
P1014
回复 0
|
赞 10
|
浏览 151
#include <iostream> #include <string> using namespace std; int main(){ string s; getline(cin, s); for(int i = 0; i < s.size(); i++){ if(s[i] >= 'A' && s[i] <= 'Z'){ s[i] += 3; if(s[i] > 'Z') ...
sadhjksdj
2026年3月9日 15:17
加密算法 题解:
P1014
回复 0
|
赞 6
|
浏览 127
利用ASCII码写 #include<bits/stdc++.h> using namespace std; int main(){ string s; while(getline(cin,s)){ int len = s.length(); for(int i = 0;i<len;i++){ &nb...
牧濑
2026年2月11日 12:26
加密算法 题解:
P1014
回复 0
|
赞 38
|
浏览 482
#include <iostream> #include <string> using namespace std; int main(){ string str; getline(cin, str); // 读整行(含空格),cin>>str 遇到空格就停只读到第一个词 for(size_t i=0;i<str.size();i++){ if(str[i]>='a'&&str[i]<='z'){ // 先变成 0~25,+3 后对 26 取模再变回字母 str[i] ...
xsw
2026年2月2日 09:09
加密算法 题解:
P1014
回复 0
|
赞 16
|
浏览 355
#include<iostream> using namespace std; int main() { string s; getline(cin, s); for (int i = 0; i < s.size(); i ++ ) { if (s[i] >= 'A' && s[i] <= 'Z') { s[i] = (s[i] - 'A' + 3) % 26 + 'A'; } if (s[i] >= 'a' && s[i] <= 'z') { ...
mlx
2026年1月29日 10:56
加密算法 题解:
P1014
回复 0
|
赞 11
|
浏览 281
#include<iostream> using namespace std; int main() { string str; while(cin>>str) { for(int i=0;i<str.size();i++) { if(str[i]>='a'&&str[i]<='z') str[i]=(str[i]-'a'+3)%26+'a'; else if(str[i]>='A'&&str[i]<='Z')...
yauqq
2026年1月28日 15:16
加密算法 题解:
P1014
回复 0
|
赞 5
|
浏览 295
#include<bits/stdc++.h> using namespace std; int main(){ string str; while(cin >> str){ for(char c:str){ if(c >= 'a' && c <= 'z') { c='a'+(c-'a'+3)%26; cout << c; }else if(c >= 'A' && c <= 'Z') { c='A'+(c-'A'+3)%26; ...
Jun_
2026年1月22日 16:54
加密算法 题解:C++
P1014
回复 0
|
赞 3
|
浏览 307
#include<stdio.h> #include <iostream> #include<math.h> #include <stdlib.h> #include <string> #include<algorithm> using namespace std; int main () { string str1; while(getline(cin,str1)) { &nbs...
1
2
3
...
5
题目
加密算法
题解数量
49
发布题解
在线答疑
热门题解
1
加密算法 题解:C
2
加密算法 题解:
3
加密算法 题解:灵活使用模运算
4
加密算法 题解:简单
5
加密算法 题解:
6
加密算法 题解:
7
加密算法 题解(C语言):
8
加密算法 题解:
9
加密算法 题解:好题解
10
加密算法 题解: