题库练习 2019年信奥赛csp-j 初赛阅读程序1:#include<bits/stdc++.h>

A61487 | 2019年信奥赛csp-j 初赛阅读程序1:#include<bits/stdc++.h>

来源2019年
时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

2019年信奥赛csp-j 初赛阅读程序1:

#include<bits/stdc++.h>
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;
}
C++ 编辑器
输入
输出