{
  "type": "code_options",
  "author": "csdn.net",
  "source": "solution.md",
  "exercise_id": "462fb7f7f607424488dab204267caa1d",
  "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解",
  "title": "1,3,3,5,5,5,7,7,7,7,9,9,9,9,9,.....",
  "desc": [
    {
      "content": "\n<p><a href=\"http://114.67.86.56:5000/Problem_Show.asp?id&#61;1045\">简单数列5</a><br />\n<strong> </strong>已知一数列&#xff1a;1,3,3,5,5,5,7,7,7,7,9,9,9,9,9,11,11,11,11,11,11,11.....请根据规律求出第n项的值。例如&#xff1a;n&#61;4 项时&#xff0c;其值为5,n&#61;11时&#xff0c;其值为9.\n<strong>输入格式 </strong>一个自然数n,(0&lt;n&lt;1000)<br />\n<br />\n<strong>输出格式</strong> 一个整数&#xff0c;即第n项的值。<br />\n<strong>样例输入&#xff1a;4</strong><br />\n<strong>样例输出 &#xff1a;5</strong></p>",
      "language": "markdown"
    }
  ],
  "answer": [
    {
      "content": "",
      "language": "cpp"
    }
  ],
  "prepared": [
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ]
  ],
  "template": {
    "content": "#include <iostream>\nusing namespace std;\nint main(){\n\tint a,b;\n\tcin>>a;\n\tint n=1,count=1,num=1;\n\tfor(int i=0;i<a;i++)\n\t{\n\t\tif(count > n)\n\t\t{\n\t\t\tnum+=2;\n\t\t\tn++;\n\t\t\tcount=1;\n\t\t\ti--;\n\t\t}\n\t\telse\n\t\t{\n\t\tcout << num << \",\";\t\n\t\tcount++;\n\t\t}\n\t}\n\tcout << endl;\n\tcout << num;\n\treturn 0;\n}",
    "language": "cpp"
  },
  "node_id": "dailycode-a3c6d1ba3eff44589c32c36ce4d9d666",
  "license": "csdn.net",
  "created_at": 1637894160,
  "topic_link": "https://bbs.csdn.net/topics/600470254"
}