Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
110520 | 秦浩然 | 字符的前导值和后继值 | C++ | Accepted | 1 MS | 276 KB | 363 | 2025-02-22 11:15:39 |
#include<iostream> using namespace std; char c; int main(){ int q,h; c = cin.get(); q=c-1; h=c+1; if(q>=32 && q<=126){ cout<<q<<endl; } else{ cout<<"Input Error!"<<endl; } if(h>=32 && h<=126){ cout<<h<<endl; } else{ cout<<"Input Error!"<<endl; } return 0; }