本篇主要是以算法为主:第一题根据题意即可解出答案,第二题主要是根据穷举法来求出其中所含有的公因子。
文章目录
- 一、最难的问题
- 二、因子个数
一、最难的问题OJ链接
// write your code here cpp
#include<bits/stdc++.h>
using namespace std;
string str;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
while(getline(cin,str))
{
for(int i=0;i<str.size();i++)
{
if(str[i]>='A'&&str[i]<='Z')
{
if(str[i]>'E') str[i]-=5;
else str[i]+=21;