{
  "type": "code_options",
  "author": "csdn.net",
  "source": "solution.md",
  "exercise_id": "7ee5105ff58a4fb5817610530ae63aae",
  "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解",
  "title": "阶乘和数",
  "desc": [
    {
      "content": "\n一个正整数如果等于组成它的各位数字的阶乘之和，该整数称为阶乘和数。\n例如，145=1!+4!+5!，则145是一个三位阶乘和数。\n请输出所有阶乘数（不会超过十万）",
      "language": "markdown"
    }
  ],
  "answer": [
    {
      "content": "",
      "language": "cpp"
    }
  ],
  "prepared": [
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ]
  ],
  "template": {
    "content": "#include <stdio.h>\nint b[10] = {0, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880};\nint main(){\n    int x, sum = 0, a;\n    for(int j = 1; j <= 100000; j++){\n        sum = 0; \n        a = j;\n        while(j != 0){\n            x = j % 10;\n            j /= 10;\n            sum += b[x];\n        }\n        j = a;\n        if(sum == a){\n            printf(\"%d \", j);\n        }\n    }\n    return 0;\n} ",
    "language": "cpp"
  },
  "node_id": "dailycode-5796b5e24b034f8485f278d8ea6b2674",
  "license": "csdn.net",
  "created_at": 1637894159,
  "topic_link": "https://bbs.csdn.net/topics/600469860"
}