文章

285

粉丝

20

获赞

875

访问

182.5k

头像
反序数 题解:
P1454 清华大学机试题
发布于2026年3月28日 18:35
阅读数 197

善用c++函数老简单了。
#include<bits/stdc++.h>
using namespace std;

int main(){
    for(int i=1;i<=2000;i++){
        int y=i*9;
        string s=to_string(y);
        reverse(s.begin(),s.end());
        int q=stoi(s);
        if(i==q) cout<<i;
    }
    
}

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发