首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
bro
2026年1月19日 15:28
加密算法 题解:c++,不用去记字母的值
P1014
回复 0
|
赞 3
|
浏览 274
#include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin,s); for(auto &i : s) { if(i>='A'&&i<='Z') { &nb...
jerryking
2026年1月16日 14:47
加密算法 题解:
P1014
回复 0
|
赞 4
|
浏览 336
#include<stdio.h> #include<string.h> #include<ctype.h> #define MAX 1000 int main(){ char s[MAX]; gets(s); for(int i=0;i<strlen(s);i++){//遍历字符串数组 if(isalpha(s[i])){//判断是否为字母 &nb...
无名1
2025年9月2日 16:35
加密算法 题解:C++
P1014
回复 0
|
赞 6
|
浏览 935
#include<bits/stdc++.h> using namespace std; int main(){ string s; getline(cin,s); for(int i=0;i<s.length();i++){ if(s[i]>=97&&s[i]<=122){ s[i]+=3; if(s[i]>122){ s[i]=97+(s[i]-122-1); } } if(s[i]>=65&&s[i]<=90){ s[i...
16696033405
2025年3月24日 17:06
加密算法 题解:简单
P1014
回复 0
|
赞 20
|
浏览 1.4k
#include<stdio.h> #include<string.h> #include<ctype.h> #define MAX 1000 int main(){ char s[MAX]; gets(s); for(int i=0;s[i]!='\0';i++){ if(isalpha(s[i])){ ...
西电机试专家
2025年3月24日 10:02
加密算法 题解:好题解
P1014
回复 0
|
赞 13
|
浏览 1.4k
# include<bits/stdc++.h> using namespace std; int main(){ string str; getline(cin,str); for(int i=0;i<str.size();i++){ if(str[i]>='a'&&str[i]<='z'){ ...
Kuze606
2025年3月22日 17:37
加密算法 题解(C语言):
P1014
回复 0
|
赞 14
|
浏览 1.1k
直接利用asc编码加3,注意需要判断+3后是否超出Z或z,利用条件运算符实现。 #include<stdio.h> #include<stdlib.h> #include<string.h> #define MAXSIZE 100 int main(){ char str[MAXSIZE]; gets(str); int len=strlen(str); int i; for(i=0; i<len; i++){ if(str[i]<='Z'&&str[i]>='A...
cc12345
2025年3月16日 19:23
加密算法 题解:注意使用getline(cin,s);函数,即可;
P1014
回复 0
|
赞 10
|
浏览 1.2k
#include< bits/stdc++.h> using namespace std; char zifu(char s) { if(isupper(s)|| islower(s)){ if(s=='X') return s='A'; else if(s=='Y') return s='B'; else if(s=='Z') return s='C'; else if(s=='x') return s='a'; else if(...
阿灿
2025年3月15日 04:04
加密算法 题解:
P1014
回复 0
|
赞 7
|
浏览 1.2k
#include<bits/stdc++.h> using namespace std; char encode(char x){ if(x=='X' ) return 'A'; if(x=='Y' ) return 'B'; if(x=='Z' ) return 'C'; if(x=='x') return 'a'; if(x=='y') return 'b'; if(x=='z') return 'c'; if((x>='A'&&x<'X') || (x>='a'&&x<'x'))...
yeee700
2025年3月11日 19:18
加密算法 题解:
P1014
回复 0
|
赞 13
|
浏览 1.4k
#include <stdio.h> #include<string.h> int main(void) { char str[100]; gets(str); int n=strlen(str); int i; for(i=0;i<n;i++){ if(str[i]>='a'...
tofu
2025年3月5日 15:26
加密算法 题解:灵活使用模运算
P1014
回复 0
|
赞 26
|
浏览 1.5k
#include <iostream> #include<string> using namespace std; int main(){ string str; getline(cin,str); for(int i=0;i<str.size();i++){ if(str[i]>='a'&&str[i]<=...
1
2
3
4
5
题目
加密算法
题解数量
49
发布题解
在线答疑
热门题解
1
加密算法 题解:C
2
加密算法 题解:
3
加密算法 题解:灵活使用模运算
4
加密算法 题解:简单
5
加密算法 题解:
6
加密算法 题解:
7
加密算法 题解(C语言):
8
加密算法 题解:
9
加密算法 题解:好题解
10
加密算法 题解: