判断题

阅读程序(1)

1-6题   组合体

#include <cstdio>

#include <cstring>

using namespace std;

char st[100];

int main() {

    scanf("%s", st);

    int n = strlen(st);

    for (int i = 1; i <= n; ++i) {

        if (n % i == 0) {

            char c = st[i - 1];

            if (c >= 'a')

                st[i - 1] = c - 'a' + 'A';

        }

    }

    printf("%s", st);

    return 0;

}

输入的字符串只能由小写字母或大写字母组成。

A

正确

B

错误

赣ICP备20007335号-2