Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
129541 | 葛屹阳 | 字符的前导值和后继值 | C++ | Accepted | 2 MS | 276 KB | 324 | 2025-08-28 09:55:23 |
#include<iostream> using namespace std; int a[50] [50]; int main() { char s; s=cin.get(); if((s-1)>=32&&(s-1)<=126) { cout<<s-1<<endl; } else { cout<<"Input Error!"<<endl; } if((s+1)>=32&&(s+1)<=126) { cout<<s+1<<endl; } else { cout<<"Input Error!"<<endl; } return 0; }