Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
110512 刘轻松 字符的前导值和后继值 C++ Accepted 1 MS 272 KB 325 2025-02-22 11:11:06

Tests(10/10):


Code:

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