题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
//https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1?tpId=37&tqId=21232&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D37&difficulty=undefined&judgeStatus=undefined&tags=&title=
#include <iostream>
#include <algorithm>
using namespace std;
bool used[58];
int main() {
string s;
while (cin >> s) {
reverse(s.begin(), s.end());
for(auto c:s){
if(!used[c]){
used[c] = 1;
cout << c;
}
}
cout << endl;
}
}
查看14道真题和解析