{"problem":{"name":"B. Add Points","description":{"content":"There are _n_ points on a straight line, and the _i_\\-th point among them is located at _x__i_. All these coordinates are distinct. Determine the number _m_ — the smallest number of points you should","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF926B"},"statements":[{"statement_type":"Markdown","content":"There are _n_ points on a straight line, and the _i_\\-th point among them is located at _x__i_. All these coordinates are distinct.\n\nDetermine the number _m_ — the smallest number of points you should add on the line to make the distances between all neighboring points equal.\n\n## Input\n\nThe first line contains a single integer _n_ (3 ≤ _n_ ≤ 100 000) — the number of points.\n\nThe second line contains a sequence of integers _x_1, _x_2, ..., _x__n_ ( - 109 ≤ _x__i_ ≤ 109) — the coordinates of the points. All these coordinates are distinct. The points can be given in an arbitrary order.\n\n## Output\n\nPrint a single integer _m_ — the smallest number of points you should add on the line to make the distances between all neighboring points equal.\n\n[samples]\n\n## Note\n\nIn the first example you can add one point with coordinate 0.\n\nIn the second example the distances between all neighboring points are already equal, so you shouldn't add anything.","is_translate":false,"language":"English"}],"meta":{"iden":"CF926B","tags":["math","number theory"],"sample_group":[["3\n-5 10 5","1"],["6\n100 200 400 300 600 500","0"],["4\n10 9 0 -1","8"]],"created_at":"2026-03-03 11:00:39"}}