{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e div.illustration { float: right; padding-left: 20px; } div.illustration .illustration { width: 100%; border-radius: 4px; }pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n color: #333;\n word-break: break-all;\n word-wrap: break-word;\n}\u003c/style\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv style\u003d\"width:25.00%\" class\u003d\"illustration\"\u003e\u003cimg src\u003d\"CDN_BASE_URL/3e3165d43b95040f6870bd060920b24d?v\u003d1675594798\" alt\u003d\"/problems/climbingworm/file/statement/en/img-0001.png\" class\u003d\"illustration\"\u003e\n\u003c/div\u003e\n\u003cp\u003eA worm is at the bottom of a pole. It wants to reach the top, but it is too lazy to climb to the top without stopping. It can crawl up the pole a certain number of inches at a time, falling down a lesser number of inches right after while it rests. How many times does the worm need to crawl up in order to reach the top of the pole?\u003c/p\u003e\n\u003ch2\u003eInput\u003c/h2\u003e\n\u003cp\u003eThe input consists of a single line that contains three integers \u003cspan class\u003d\"tex2jax_process\"\u003e$a, b$\u003c/span\u003e (\u003cspan class\u003d\"tex2jax_process\"\u003e$0 \\leq b \u0026lt; a \\leq 100$\u003c/span\u003e), and \u003cspan class\u003d\"tex2jax_process\"\u003e$h$\u003c/span\u003e, (\u003cspan class\u003d\"tex2jax_process\"\u003e$0 \u0026lt; h \\leq 100\\, 000$\u003c/span\u003e) indicating the amount \u003cspan class\u003d\"tex2jax_process\"\u003e$a$\u003c/span\u003e of inches the worm can climb at a time, the amount \u003cspan class\u003d\"tex2jax_process\"\u003e$b$\u003c/span\u003e of inches the worm falls during its resting period, and the height \u003cspan class\u003d\"tex2jax_process\"\u003e$h$\u003c/span\u003e of the pole, respectively. For the purposes of this problem, the worm is modeled as a point and thus has no length.\u003c/p\u003e\n\u003ch2\u003eOutput\u003c/h2\u003e\n\u003cp\u003eOutput the number of times the worm must crawl up in order to reach the top of the pole.\u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5 0 15\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3 1 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}