1 条题解

  • 0
    @ 2025-10-8 16:48:12

    scy视频

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int x;
        scanf("%d", &x);
        int s = 0; 
        while (x != 0)
        {
            s = s + x % 10;
            x = x / 10;
        }
        printf("%d\n", s);
        return 0;
    }
    
    • 1

    *【C++语言:循环结构(while)】位数和(视频)

    信息

    ID
    35
    时间
    1000ms
    内存
    128MiB
    难度
    6
    标签
    递交数
    898
    已通过
    280
    上传者