10 条题解

  • 0
    @ 2022-2-20 20:38:43

    #include #include <math.h> using namespace std; int main() {#include #include <math.h> using namespace std; int main() { int n; cin >> n; for (int i = 5; i <= n; i++) { int sum = ii; int flag = 0; int ans = 0; for (int j = 1; sum!= 0;j = j10) { ans = ans +(sum%10)*j; sum/=10; if (ans == i) { flag = 1; }

        }
        if (flag == 1)
        {
            cout<< i << " ";
        }
    }
    

    }

    信息

    ID
    941
    时间
    1000ms
    内存
    32MiB
    难度
    4
    标签
    递交数
    377
    已通过
    188
    上传者