5 条题解

  • -2
    @ 2026-6-6 11:37:13

    #include using namespace std;

    int main() { int n; cin >> n; int a = n / 100; //百位 int b = n / 10 % 10; //十位 int c = n % 10; //个位

    int sum = a*a*a + b*b*b + c*c*c;
    if(sum == n)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
    return 0;
    

    } 水仙花数:百位立方 + 十位立方 + 个位立方 = 原数 例

    • -2
      @ 2026-6-3 20:00:06

      #include using namespace std;

      int main() { int n, a, b, c; int sum = 0; cin >> n; a = n / 100; b = n % 100 / 10; c = n % 10; sum = a * a * a + b * b * b + c * c * c; if (sum == n) { cout << "YES"; } else { cout << "NO"; } return 0; }

    • -2
      @ 2026-5-23 15:41:08

      #include <bits/stdc++.h> using namespace std;

      int main() { long long a,b,c,d; cin>>a; b=a/100; c=a%100/10; d=a%100%10; if(bbb+ccc+ddd==a){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }

    • -7
      @ 2026-5-23 11:33:10

      数学老师没教过>:(

    • -10
      @ 2026-5-23 19:56:37

      #include using namespace std;

      int main() { int n; cin >> n; int a = n/100, b = n/10%10, c = n%10; cout << (aaa + bbb + ccc == n ? "YES" : "NO"); return 0; }

      • 1

      信息

      ID
      30933
      时间
      1000ms
      内存
      256MiB
      难度
      7
      标签
      (无)
      递交数
      188
      已通过
      43
      上传者