Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
2574 邓程允 字符的前导值和后继值 C++ Wrong Answer 0 MS 256 KB 388 2024-01-13 18:01:44

Tests(1/10):


Code:

# 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"<<endl; } else { cout<<int(ch)-1<<endl; } if(int(ch)+1<32||int(ch)+1>126){ cout<<"Input Error"<<endl; } else { cout<<int(ch)+1<<endl; } return 0; }


Run Info:

------Input------
~
------Answer-----
125 Input Error!
------Your output-----
125 Input Error