<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>模拟 on Algorithm Solutions</title><link>https://algorithm.liangqin.ren/tags/%E6%A8%A1%E6%8B%9F/</link><description>Recent content in 模拟 on Algorithm Solutions</description><generator>Hugo -- gohugo.io</generator><lastBuildDate>Thu, 29 Oct 2026 15:10:53 -0500</lastBuildDate><atom:link href="https://algorithm.liangqin.ren/tags/%E6%A8%A1%E6%8B%9F/index.xml" rel="self" type="application/rss+xml"/><item><title>8. 按倍数循环移动数字</title><link>https://algorithm.liangqin.ren/oa/8/</link><pubDate>Thu, 29 Oct 2026 15:10:53 -0500</pubDate><guid>https://algorithm.liangqin.ren/oa/8/</guid><description>1. Description 有 n 个格子，编号为 1 到 n，初始时第 i 个格子中的数字为 i。
依次对 x = 1, 2, &amp;hellip;, n 操作：将编号为 x 的倍数的格子中的数字，按编号递增方向循环移动一格，最后一个格子中的数字移到 x 号格子。格子编号不变。
输入一个整数 n，满足 1 &amp;lt;= n &amp;lt;= 10$^5$。
输出一行 n 个数字，依次表示操作结束后 1 到 n 号格子中的数字。
2. Solution 模拟 Time complexity: O(nlogn)
Space complexity: O(n)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 #include &amp;lt;bits/stdc++.</description></item></channel></rss>