链接
判断 x 除以 16的余数是不是一直都大于等于10.
Code:
#include <bits/stdc++.h>
using ll = long long;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::stack<char> stk;
for (int i = 2023; ; i++) {
int x = i;
bool f = false;
while (x) {
if (x % 16 < 10) {
f = true;
break;
}
x /= 16;
}
if (!f) {
std::cout << i;
break;
}
}
return 0;
}