Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2572 | 邓程允 | 字符的前导值和后继值 | C++ | Wrong Answer | 0 MS | 260 KB | 364 | 2024-01-13 18:00:28 |
# include<iostream> using namespace std; int main(){ char ch; int q,h; cin>>ch; if(int(ch)-1<32||int(ch)-1>126){ cout<<"input Error"; } else { cout<<int(ch)-1; } if(int(ch)+1<32||int(ch)+1>126){ cout<<"input Error"; } else { cout<<int(ch)+1; } return 0; }
------Input------
6
------Answer-----
53 55
------Your output-----
5355