求救大佬!!!
查看原帖
求救大佬!!!
1025321
midsummer_zyl楼主2023/7/9 13:06

60分代码:

#include <bits/stdc++.h>
using namespace std;
int main() {
	int n, s = 0;
	scanf("%d", &n);
	for (int i = n + 1; ; i++) {
		int j = i;
		s = 0;
		while (j != 0) {
			s = s * 10 + j % 10;
			j /= 10; 
		}
		if(s == i) {
			printf("%d", i);
			return 0;
		}
	}
    return 0;
}
2023/7/9 13:06
加载中...