标签:
2 asdasl+%$^&ksdhkjhjksd adklf&(%^(alkha
q j
代码:
#include<iostream> #include<string> using namespace std; int main() { int t; cin>>t; while(t--) { char str[26]={‘z‘,‘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‘}; string str1;int i,j=0,k,len; cin>>str1; len = str1.length(); for(i = 0; i < len;i++ ) if((str1[i] >= ‘a‘)&&(str1[i] <=‘z‘)) j++; k = j%26; if(k==0) cout<<"z"<<endl; else cout<<str[k]<<endl; } return 0; }
标签:
原文地址:http://blog.csdn.net/u012701023/article/details/46043167