| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 77725 | 刘济玮 | 字符的前导值和后继值 | C++ | Accepted | 1 MS | 276 KB | 297 | 2024-06-15 11:34:33 |
#include<bits/stdc++.h> using namespace std; int main(){ char c; scanf("%c",&c); int a=c-1; int b=c+1; if(a>=32&&a<=126){ cout<<a<<endl; }else{ cout<<"Input Error!"<<endl; } if(b>=32&&b<=126){ cout<<b<<endl; }else{ cout<<"Input Error!"<<endl; } return 0; }