Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153206 肖之睿 字符的前导值和后继值 C++ Accepted 1 MS 276 KB 295 2026-05-10 13:39:53

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char c; c=cin.get(); int i=c-1; int n=c+1; if(i>=32&&i<=126){ cout<<i<<endl; }else{ cout<<"Input Error!"<<endl; } if(n>=32&&n<=126){ cout<<n; }else{ cout<<"Input Error!"; } return 0; }