#define N (1<<17)
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
char s[N];
int T,k,cas;
int main()
{
gets(s);//输入密文
for(k=strlen(s)/2;k>1;--k)
{
printf("key: %d\n",k);
int l=strlen(s),n=l/k,m=l%k;
for(int i=0;i<l;i++)
{
int x=i/k,y=i%k;
if(y<=m)
putchar(s[y*(n+1)+x]);
else
putchar(s[m*(n+1)+(y-m)*n+x]);
}
putchar('\n');
}
return 0;
}
栅栏解密
最新推荐文章于 2023-09-19 20:44:52 发布