Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153611 李昱龙 字符的前导值和后继值 C++ Accepted 1 MS 268 KB 338 2026-05-23 13:48:35

Tests(10/10):


Code:

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