主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
专业课程
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
我能走到对岸吗
2024年4月20日 12:15
加密算法 题解:
P1014
回复 0
|
赞 1
|
浏览 115
#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] <= 'w' || str[i] >= 'A' && str[i] <= 'W') str[i] += ...
20082123
2024年3月28日 16:32
加密算法 题解:
P1014
回复 0
|
赞 1
|
浏览 192
#include<bits/stdc++.h> using namespace std; int main(){ string s; getline(cin,s); for(int i=0;i<s.size();i++){ if('A'<=s[i]&&s[i]<='Z') ...
渐鸿于陆
2024年3月21日 17:55
加密算法 题解:C语言题解。一开始用的scanf,就发现错了,哈哈哈
P1014
回复 0
|
赞 0
|
浏览 296
#include<string.h> #include<stdio.h> int main(void){ char s[105]; gets(s); int len = strlen(s); for(int i = 0;i<len;i++){ if(s[i]>='a' && s[i]...
lingdongyang
2024年3月15日 15:42
加密算法 题解:
P1014
回复 0
|
赞 0
|
浏览 379
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { char s[105]; gets(s); int len = strlen(s); for (int i = 0; i < len; i++) { if (s[i] >= 'a' && s[i] <= 'z') { s[i] += 3; if (s[i] > 'z')s[i] -= 26; } else if (s[...
FCC
2024年3月15日 10:49
加密算法 题解:getline( cin, str )读取一行字符串,
P1014
回复 0
|
赞 1
|
浏览 224
#include <bits/stdc++.h> using namespace std; int main(){ string str; getline( cin, str ); //字符串里有空白字符,故要用getline()获取一行,若直接用cin >> str则只读取到第一个空格符截止 //char数组的长度strlen(ch),string数组的长度str.length() for( int i=0; i < str.length(); i++ ){ if( str[i] >= 'A' &a...
小酒
2024年3月11日 15:52
加密算法 题解:
P1014
回复 0
|
赞 0
|
浏览 232
1014解题思路 #include <bits/stdc++.h> using namespace std; int main() { char a[105]={0}; gets(a); int l=strlen(a); for(int i=0;i<l;i++) { &nbs...
光明守护神
2024年3月9日 21:20
加密算法 题解:C++
P1014
回复 0
|
赞 0
|
浏览 211
#include <iostream> using namespace std; int main() { string s; while (cin >> s) { string::iterator it; for (it = s.begin(); it < s.end(); it++) { if (*it >= 'a' && *it <= 'z') { *it += 3; if (*it > 'z') { *it %= '...
LianG_nnuo
2022年11月11日 21:48
c 加密算法
P1014
回复 1
|
赞 2
|
浏览 4.2k
#include<stdio.h> #include<stdlib.h> #include<string.h> /*编写加密程序,加密规则为:将所有字母转化为该字母后的第三个字母, 即A->D、B->E、C->F、......、Y->B、Z->C。小写字母同上,其他字符不做转化。 输入任意字符串,输出加密后的结果。 例如:输入"I love 007",输出"L oryh 007*/ void main(){ int n,i=0; ...
williams
2024年3月6日 14:17
加密算法 题解:c ez
P1014
回复 0
|
赞 0
|
浏览 231
#include <stdio.h> #include <string.h> //01字符串,通过0/1开头来查找子串 int main(void) { char s[100]; fgets(s, 100, stdin); for(int i=0;i<strlen(s);i++){ if((s[i]>='a'&&s[i]<'x')||(s[i]>='A'&&s[i]<'X')) s[i] = s[i]+3; else ...
Yw1111111
2024年3月5日 22:35
加密算法 题解:Python求解,学会利用ord和chr函数
P1014
回复 0
|
赞 0
|
浏览 173
while True: try: str = input() text = "" for char in str: if char.isalpha(): shift = 3 if char.islower(): start = ord('a') else: start = or...
1
2
3
题目
加密算法
题解数量
25
发布题解
热门题解
1
题解:加密算法
2
1014
3
简单加密
4
只要认真审题就不会出错
5
c 加密算法
6
就是字符串处理
7
求余
8
加密算法 题解:getline( cin, str )读取一行字符串,包括空白字符;字母循环;string输出方式
9
加密算法 题解:
10
Accepted答案-加密(C)