304026: CF774C. Maximum Number

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Maximum Number

题意翻译

你有$n$根火柴棍,你可以用他们摆出$0$到$9$任意一个数字,每个数字所需要的火柴棍个数如图所示,你需要求出用这$n$根火柴棍能拼出的最大数是多少(不能包含前导零)。

题目描述

Stepan has the newest electronic device with a display. Different digits can be shown on it. Each digit is shown on a seven-section indicator like it is shown on the picture below. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF774C/7e680319981615bc8164e9951beec5e830c7cca7.png)So, for example, to show the digit $ 3 $ on the display, $ 5 $ sections must be highlighted; and for the digit $ 6 $ , $ 6 $ sections must be highlighted. The battery of the newest device allows to highlight at most $ n $ sections on the display. Stepan wants to know the maximum possible integer number which can be shown on the display of his newest device. Your task is to determine this number. Note that this number must not contain leading zeros. Assume that the size of the display is enough to show any integer.

输入输出格式

输入格式


The first line contains the integer $ n $ ( $ 2<=n<=100000 $ ) — the maximum number of sections which can be highlighted on the display.

输出格式


Print the maximum integer which can be shown on the display of Stepan's newest device.

输入输出样例

输入样例 #1

2

输出样例 #1

1

输入样例 #2

3

输出样例 #2

7

Input

题意翻译

你有$n$根火柴棍,你可以用他们摆出$0$到$9$任意一个数字,每个数字所需要的火柴棍个数如图所示,你需要求出用这$n$根火柴棍能拼出的最大数是多少(不能包含前导零)。

加入题单

上一题 下一题 算法标签: