Files
python/TangDou/CSP-J/J1_2019/2_3.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

31 lines
682 B
C++

#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;
}