题解 | #反序数#
反序数
https://www.nowcoder.com/practice/e0d06e79efa44785be5b2ec6e66ba898
#include <iostream>
using namespace std;
int main() {
int a, b;
for(int a=1000;a<10000;a++)
{
b=(a%10)*1000+(a%100/10)*100+(a%1000/100)*10+a/1000;
if(9*a==b){cout<<a;break;}
}
}
// 64 位输出请用 printf("%lld")
老板电器公司氛围 216人发布
