You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
682 B
31 lines
682 B
2 years ago
|
#include <bits/stdc++.h>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
char st1[100];
|
||
|
char st2[100];
|
||
|
int main() {
|
||
|
scanf("%s", st1);
|
||
|
memcpy(st2, st1, sizeof st1);
|
||
|
int n = strlen(st1);
|
||
|
// acBddc124DbcdDa
|
||
|
// acdbsdfwesdf234jlkjDSDFSDFjxxvxc
|
||
|
for (int i = 1; i <= n; i++) {
|
||
|
if (n % i == 0) {
|
||
|
char c = st1[i - 1];
|
||
|
if (c >= 'a') st1[i - 1] = c - 'a' + 'A';
|
||
|
}
|
||
|
}
|
||
|
printf(st1);
|
||
|
puts("");
|
||
|
|
||
|
n = strlen(st2);
|
||
|
for (int i = 1; i <= n * n; i++) {
|
||
|
if (n % i == 0) {
|
||
|
char c = st2[i - 1];
|
||
|
if (c >= 'a') st2[i - 1] = c - 'a' + 'A';
|
||
|
}
|
||
|
}
|
||
|
printf(st2);
|
||
|
return 0;
|
||
|
}
|