亲朋字符串题解java
摘要:解题思路:s1和s长度相同,不考虑最后一个字符,s1[i]=(char)s[i]的ASCII码+s[i+1]的ASCII码,考虑最后一个字符:s1[i]=(char)s[i]的ASCII码+s[0]的……
要注意测试案例会包括空格
摘要:解题思路:注意事项:要用gets函数,测试数据里面有空格,%s接受不了参考代码:#include<stdio.h>#include<string.h>int main(){ char a[100]; ……
输出亲朋字符串(c++)
摘要:```cpp
#include
using namespace std;
int main(){
string s;
getline(cin,s);//此函数可读取整行,包括……
题解 2850: 输出亲朋字符串
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[103];int main(){ cin.getline(s,103……
2850: 输出亲朋字符串
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N=1e7;stri……
耿直思路的代码解决输出亲朋字符串
摘要:解题思路:注意事项:101参考代码:a=input()A=list(a)B=[]for i in range(len(A)): if i<len(A)-1: C=ord(A[i])+o……
想太多了,很简单的题搞半天
摘要:解题思路:没啥思路,就循环相加就是注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i,p; char s[100]……
2850: 输出亲朋字符串
摘要:```
#include
using namespace std;
const int N=100010;
int main(){
string a,b;
getline(cin,a)……