vscode跑不了的程序
#include <stdio.h>
int highestOrder(int x) {
int res = 1;
while (x > 9) {
x /= 10;
res *= 10;
}
return res;
}
int main() {
int A, B;
int ans = 0;
scanf("%d %d", &A, &B);
for (int n = A; n <= B; n++) {
int highest = highestOrder(n);
int m = highest * (n % 10) + n / 10;
while (m!= n) {
if (n <= m && m <= B) {
ans++;
}
int tempHighest = highestOrder(m);
int nextM = tempHighest * (m % 10) + m / 10;
m = nextM;
}
}
printf("%d\n", ans);
return 0;
}

各位有什么改进方案吗?