4 条题解
-
1
#include <iostream> using namespace std; int main() { for (int num = 100; num <= 999; ++num) { int hundreds = num / 100; // 百位 int tens = (num / 10) % 10; // 十位 int ones = num % 10; // 个位 if (hundreds * hundreds * hundreds + tens * tens * tens + ones * ones * ones == num) { cout << num << endl; } } return 0; }
信息
- ID
- 7
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 4
- 标签
- 递交数
- 66
- 已通过
- 30
- 上传者