写在前面
最近好久都没发文章了,前几篇的热度也慢慢褪去了,于是小刘决定,以后周三,周六和周日都会更刷题日记!(寒暑假基本天天发)
我们的题目是从两方面来的:
1、洛谷
洛谷是中国著名OJ,就不用多介绍了吧...
我最近讲的题都是洛谷里的红题/橙题/黄题,难度入门~提高。
2、CSES
这个可能大家没听说过,这是外国的一个小网站,里面有300道题,都是英文的,只要AC了里面的所有题就基本是CSP-S一等奖了!
这个里面的题我都是按顺序讲的,前100道基本是普及组的所有题。
PS:顺便说一下我的小目标,今年暑假开始前粉丝破1000,今年粉丝破2000!
废话不多说,开始吧!
先上题目...
Consider an algorithm that takes as input a positive integer nn. If nn is even, the algorithm divides it by two, and if nn is odd, the algorithm multiplies it by three and adds one. The algorithm repeats this, until nn is one. For example, the sequen