A
#include<iostream>
#include<cstring>
#include<algorithm>
#include<string>
using namespace std;
const int N = 1e5 + 10;
int main()
{
string a;
getline(cin, a);
for (int i = 0; i < a.size(); i++)
{
if (a[i] >= 'A' && a[i] <= 'Z')
{
char op = a[i];
op -= 5;
if (op < 'A') op = op - 'A' + 'Z'+1;
cout << op;
}
else cout << a[i];
}
return 0;
}
B
#include<iostream>
using namespace std;
int main()
{
int n,k;
while(cin>>n>>k)
{
int t=1;
int m=n;
double h=200;
while(t<=20)
{
if(m>=h)
{
cout<<t<<endl;
break;
}
m=m+n;
h=h*(1+0.01*k);
t++;
}
if(t>20)cout<<"Impossible"<<endl;
}
return 0;
}
C
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int flag = 0;
int happy = 0;
for (int i = 1; i <=n; i++)
{
int a, b;
cin>>a>>b;
int sum = b / a;
if (sum > happy)
{
happy = b / a;
flag = i;
}
}
cout << flag;
return 0;
}