记录PTA甲级以及C++部分语法知识1031

这一题我一开始想着能够考虑对字符串的长度模3,分不一样的状况肯定n1和n2的值,可是好像状况有点多,不如用循环来作。ios #include<iostream> #include<cstring> using namespace std; int main(){ char str[82]; int i,j; cin>>str; int len=strlen(str); int n1=
相关文章
相关标签/搜索