9 条题解
-
1
#include <iostream> #include <cstdio> #include<string> using namespace std; int main(){ string str; getline(cin,str); for(int i=0;i<str.length();i++){ if(str[i]>='a'&&str[i]<='u'){ str[i]+=5; }else if(str[i]>='v'&&str[i]<='z') { if(str[i]=='v')str[i]='a'; if(str[i]=='w')str[i]='b'; if(str[i]=='x')str[i]='c'; if(str[i]=='y')str[i]='d'; if(str[i]=='z')str[i]='e'; } } cout<<str; return 0; }
c++
-
1
#include<bits/stdc++.h> using namespace std; int main() { string s1; getline(cin,s1); for(int i=0;i<s1.length();i++) { if(int(s1[i])>=97&&int(s1[i])<=117) { s1[i]=char(int(s1[i])+5); } else if(s1[i]>='v'&&s1[i]<='z') { if(s1[i]=='v')s1[i]='a'; if(s1[i]=='w')s1[i]='b'; if(s1[i]=='x')s1[i]='c'; if(s1[i]=='y')s1[i]='d'; if(s1[i]=='z')s1[i]='e'; } } cout<<s1<<endl; return 0; }
-
0
python的哦~
a=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] abc={"a":1,"b":2,"c":3,"d":4,"e":5,"f":6,"g":7,"h":8,"i":9,"j":10,"k":11,"l":12,"m":13,"n":14,"o":15,"p":16,"q":17,"r":18,"s":19,"t":20,"u":21,"v":22,"w":23,"x":24,"y":25,"z":26} cba={1:"a",2:"b",3:"c",4:"d",5:"e",6:"f",7:"g",8:"h",9:"i",10:"j",11:"k",12:"l",13:"m",14:"n",15:"o",16:"p",17:"q",18:"r",19:"s",20:"t",21:"u",22:"v",23:"w",24:"x",25:"y",26:"z"} love=input() love_max=[] for i in love: if i in a: x=abc[i] x+=5 if x>26: x-=26 i=cba[x] love_max.append(i) love_super_max="" love_super_max="".join(love_max) # 语法:str.join(sequence) print(love_super_max)
-
0
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; char d; cin>>noskipws; while(cin>>d) { c=(int)d; if(c<97||c>122)printf("%c",c); else if(c!=118&&c!=119&&c!=120&&c!=121&&c!=122)printf("%c",(c+5)); else switch(c){ case 118:cout<<'a';break; case 119:cout<<'b';break; case 120:cout<<'c';break; case 121:cout<<'d';break; case 122:cout<<'e';break; } } }
-
-1
#include <bits/stdc++.h> using namespace std; int main() { string a; while (cin>>a){ int b=0; b=a.length(); if(b==10){ cout <<" "; } for (int i=0;i<b;i++){ if(a[i]>=97 and a[i]<=122) { if(a[i]>117){a[i]=a[i]-21;} else{a[i]=a[i]+5;} cout <<a[i]; }else{ cout<<a[i]; }
} cout<<" "; } return 0;
}
- 1
信息
- ID
- 75
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 4
- 标签
- 递交数
- 1362
- 已通过
- 613
- 上传者