首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
渐鸿于陆
2024年3月21日 17:55
加密算法 题解:C语言题解。一开始用的scanf,就发现错了,哈哈哈
P1014
回复 0
|
赞 6
|
浏览 1.6k
#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
|
赞 2
|
浏览 1.5k
#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
|
赞 2
|
浏览 1.5k
#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
|
浏览 1.2k
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
|
浏览 1.3k
#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
|
浏览 5.6k
#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
|
浏览 1.1k
#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
|
浏览 923
while True: try: str = input() text = "" for char in str: if char.isalpha(): shift = 3 if char.islower(): start = ord('a') else: start = or...
orderrr
2024年2月24日 16:33
加密算法 题解:
P1014
回复 0
|
赞 0
|
浏览 1.2k
#include <bits/stdc++.h> using namespace std; /* 思想: 1、string 的话,遇到空格就不读了 所以用fgets 2、遇到字母 才操作 3、 无论大小字母 输出的时候都是 + 2 4、遇到越界 就需要循环输出了 例如 z —> c */ int main() { char c[100]; &n...
carrot_huan
2024年1月13日 22:00
加密算法 题解:
P1014
回复 0
|
赞 2
|
浏览 1.6k
#include <stdio.h> #include<string.h> int main() { char string[100]; fgets(string,sizeof(string),stdin); for(int i=0;i<strlen(string);i++){ if(string[i]>='a'&&string[i]<='z') string[i]=...
1
2
3
4
5
题目
加密算法
题解数量
43
发布题解
在线答疑
热门题解
1
加密算法 题解:C
2
加密算法 题解:灵活使用模运算
3
加密算法 题解:简单
4
加密算法 题解:
5
加密算法 题解:
6
加密算法 题解(C语言):
7
加密算法 题解:好题解
8
加密算法 题解:注意使用getline(cin,s);函数,即可;
9
加密算法 题解:
10
加密算法 题解: