#include "stdafx.h"
#include <string.h>
int
main(
int
argc,
char
* argv[])
{
char
* cmp_str =
"KanXueCTF2019JustForhappy"
;
char
* raw_str =
"abcdefghiABCDEFGHIJKLMNjklmn0123456789opqrstuvwxyzOPQRSTUVWXYZ"
;
char
index_arr[30] = {0};
char
pwd[30] = {0};
for
(
int
i=0;i<
strlen
(cmp_str);i++)
{
for
(
int
j = 0; j <
strlen
(raw_str);j++ )
{
if
(cmp_str[i] == raw_str[j])
{
index_arr[i] = j;
break
;
}
}
}
for
(i=0;i<
strlen
(cmp_str);i++)
{
if
(index_arr[i]+48 >=48 && index_arr[i]+48 <= 57 )
{
pwd[i] = index_arr[i]+48;
printf
(
"%c"
,index_arr[i]+48);
}
if
(index_arr[i]+87 >=97 && index_arr[i]+87 <= 122 )
{
pwd[i] = index_arr[i]+87;
printf
(
"%c"
,index_arr[i]+87);
}
if
(index_arr[i]+29 >=65 && index_arr[i]+29 <= 90 )
{
pwd[i] = index_arr[i]+29;
printf
(
"%c"
,index_arr[i]+29);
}
}
printf
(
"\n%s\n"
, pwd);
getchar
();
printf
(
"Hello World!\n"
);
return
0;
}