本文共 271 字,大约阅读时间需要 1 分钟。
这题很水,记录一下reverse函数使用
#include#include #include #include using namespace std;const int maxn=1e5+6;int main(){ int n; cin>>n; char ch[200]; cin>>ch; for(int i=1;i<=n;i++){ if(n%i==0){ reverse(ch,ch+i); } } cout< <
转载地址:http://gunt.baihongyu.com/