给定一个正整数 $n$。我们希望将 $n$ 表示为尽可能多的正整数之和,要求每个数最多只能使用一次,且不能使用任意两个连续的数。
输入格式
输入的第一行包含一个整数 $n$($1 \le n \le 10^{18}$)。
输出格式
你的程序应输出一个整数:满足要求的拆分中最大的加数个数。
样例
输入
6
输出
2
As we are currently experiencing an overwhelming number of web requests for fetching user submissions, we have temporarily disabled the full submissions list. You must now be logged in to view submissions.
给定一个正整数 $n$。我们希望将 $n$ 表示为尽可能多的正整数之和,要求每个数最多只能使用一次,且不能使用任意两个连续的数。
输入的第一行包含一个整数 $n$($1 \le n \le 10^{18}$)。
你的程序应输出一个整数:满足要求的拆分中最大的加数个数。
6
2
The discussion section is only for posting: Editorials, General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.
This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.
If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.
Guidelines: