QOJ.ac

QOJ

时间限制: 1 s 内存限制: 64 MB 总分: 100

#811. 数字构造器

统计

这是一个简单的任务。甚至更简单。我们喜欢生成不同的数字,我们认为你也会喜欢它。给定一个整数 $s$,请尝试生成一个数字,使其各位数字之和等于 $s$,且不包含数字 $0$,同时任意相邻的数字都不相等,并使该数字最大。

输入包含一行,为一个整数 $s$。

$$1 \le s \le 42$$

输出一个满足题目要求的最大数字。

样例

输入格式 1

1

输出格式 1

1

输入格式 2

2

输出格式 2

2

Discussions

About Discussions

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.

Open Discussions 0
No discussions in this category.

Issues

About Issues

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:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.