| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61179 | 祝家懿 | 字符的前导值和后继值 | C++ | Accepted | 1 MS | 272 KB | 370 | 2023-12-02 17:13:17 |
#include<iostream> #include<cstdio> using namespace std; int main(){ char ch=cin.get(); if(ch-1==31){ cout<<"Input Error!"<<endl; cout<<ch+1; return 0; } else if(ch+1==127){ cout<<ch-1<<endl; cout<<"Input Error!"; return 0; } cout<<ch-1<<endl; cout<<ch+1<<endl; return 0; }