| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61183 | 石茂诤 | 字符的前导值和后继值 | C++ | Accepted | 1 MS | 268 KB | 344 | 2023-12-02 17:20:21 |
# include<iostream> #include<cstdio> using namespace std; int main(){ char a=cin.get(); cin>>a; int c=a+1,b=a-1; if(b>=32&&b<=126){ cout<<b<<endl; } else{ cout<<"Input Error!"<<endl; } if(c>=32&&c<=126){ cout<<c<<endl; } else{ cout<<"Input Error!"<<endl; } return 0; }