这是一个简单的任务。甚至更简单。我们喜欢生成不同的数字,我们认为你也会喜欢它。给定一个整数 $s$,请尝试生成一个数字,使其各位数字之和等于 $s$,且不包含数字 $0$,同时任意相邻的数字都不相等,并使该数字最大。
输入包含一行,为一个整数 $s$。
$$1 \le s \le 42$$
输出一个满足题目要求的最大数字。
样例
输入格式 1
1
输出格式 1
1
输入格式 2
2
输出格式 2
2
这是一个简单的任务。甚至更简单。我们喜欢生成不同的数字,我们认为你也会喜欢它。给定一个整数 $s$,请尝试生成一个数字,使其各位数字之和等于 $s$,且不包含数字 $0$,同时任意相邻的数字都不相等,并使该数字最大。
输入包含一行,为一个整数 $s$。
$$1 \le s \le 42$$
输出一个满足题目要求的最大数字。
1
1
2
2
The discussion section is only for posting: 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: