#include<iostream> using namespace std; int main() { int n,y; char x; cin >> n; while (n--) { cin >> x >> y; if (x>='A'&&x<='Z') { cout << y + (x - 'A' + 1)<<endl; } if(x>='a'&&x<='z') { cout << y - (x - 'a' + 1)<<endl; } } return 0; }
C++ hdu 2055 An easy problem
最新推荐文章于 2024-05-16 20:31:41 发布