A. Enlarge GCD
时间: 2023-11-04 10:04:30 浏览: 80
Image_Enlarge.zip_image enlarge_放大图像
根据引用\[2\]的分析,要想增大最大公约数(GCD),需要有新的公共质因子加入GCD。而为了删除数字最少,这个质因子必须在不同数字中出现次数最多。因此,可以先求出所有数字的GCD,然后每个数字都除去这个GCD,再统计出现次数最多的质因数。最终答案就是n减去这个最大的次数。
#### 引用[.reference_title]
- *1* [A. Enlarge GCD(O(n)筛选因子)](https://blog.csdn.net/jziwjxjd/article/details/106862961)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* *4* *5* [[思维][gcd]Enlarge GCD CF1047C](https://blog.csdn.net/m0_55982600/article/details/122976361)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文