首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
mlx
2026年3月16日 11:23
字符串的反码 题解:
P1364
回复 0
|
赞 4
|
浏览 260
#include<iostream> using namespace std; string str; void work() { for(int i=0;i<str.size();i++) { if(str[i]>='a'&&str[i]<='z') { int d=str[i]-'a'; str[i]='z'-d; } else if(str[i]>='A'&&a...
曾不会
2026年2月1日 10:19
字符串的反码 题解:
P1364
回复 0
|
赞 1
|
浏览 355
while(1): try: s=input() if(s=='!'): break l=len(s) for i in s: if i.isalpha(): if i.islower(): print(chr(ord('a')+ord('z')-ord(i)),end='') ...
yauqq
2026年1月30日 15:20
字符串的反码 题解:
P1364
回复 0
|
赞 6
|
浏览 328
#include<bits/stdc++.h> using namespace std; int main(){ string str; while(getline(cin, str)){ if(str == "!") return 0; else{ for(char c:str){ if(c >= 'a' && c <= 'z'){ c = 'z'-c+'a'; }else if(c >= 'A' && c <= 'Z'){ c...
James
2021年1月13日 11:07
string
P1364
回复 0
|
赞 12
|
浏览 8.4k
#include<iostream> #include<algorithm> #include<cstdio> #include<string> using namespace std; string a; int main(){ while(cin>>a){ if(a=="!") break; for(int i=0;i<a.length();i++){ &...
myhy001
2020年1月1日 13:26
反码
P1364
回复 0
|
赞 24
|
浏览 11.0k
#include<stdio.h> #include<string.h> int main() { char a[100]; while(scanf("%s",a)!=EOF) { char *p=a; if(*p=='!') break; else  ...
题目
字符串的反码
题解数量
5
发布题解
在线答疑
热门题解
1
反码
2
string
3
字符串的反码 题解:
4
字符串的反码 题解:
5
字符串的反码 题解: