774C.md (1301B)
1 Source: https://codeforces.com/problemset/problem/774/C 2 3 C. Maximum Number 4 5 time limit per test 6 7 1 second 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 standard input 16 17 output 18 19 standard output 20 21 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. 22 23  24 25 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. 26 27 The battery of the newest device allows to highlight at most *n* sections on the display. 28 29 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. 30 31 Input 32 33 The first line contains the integer *n* (2 ≤ *n* ≤ 100 000) — the maximum number of sections which can be highlighted on the display. 34 35 Output 36 37 Print the maximum integer which can be shown on the display of Stepan's newest device. 38 39 Examples 40 41 Input 42 43 ``` 44 2 45 ``` 46 47 Output 48 49 ``` 50 1 51 ``` 52 53 Input 54 55 ``` 56 3 57 ``` 58 59 Output 60 61 ``` 62 7 63 ```