VK Cup 2017
来源:互联网 发布:谁用过淘宝牙齿矫正器 编辑:程序博客网 时间:2024/03/29 09:58
C. Maximum Number
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
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.
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.
Input
The first line contains the integer n (2 ≤ n ≤ 100 000) — the maximum number of sections which can be highlighted on the display.
Output
Print the maximum integer which can be shown on the display of Stepan’s newest device.
Examples
input
2
output
1
input
3
output
7
#include <iostream>#include <stdio.h>using namespace std;int main(){ int n; scanf("%d",&n); if(n%2) { printf("7"); n-=3; } while(n) { printf("1"); n-=2; } return 0;}
- VK Cup 2017
- Codeforces VK Cup 2017
- VK Cup 2017
- VK Cup 2017
- VK Cup 2017
- VK Cup 2017
- [杂题] Codeforces 772D VK Cup 2017
- [几何] Codeforces 772B VK Cup 2017
- VK CUP 2017 C String Reconstruction
- 【VK Cup 2012】final
- Codeforences #351 VK CUP
- VK Cup 2015
- Codeforces VK Cup 2015
- [Codeforces VK Cup 2016
- VK Cup 2015
- VK Cup 2015
- [数论 DAG最长路] Codeforces 772C VK Cup 2017
- [交互 点分治] Codeforces 772E VK Cup 2017
- Maven管理项目的时候 Update Project后jre变成1.5
- 解析制作俄罗斯APT组织使用的快捷方式后门文件
- IP地址和子网掩码
- Git使用 记录总结
- LIBSVM参数
- VK Cup 2017
- 搜索 noip1792 迷宫
- 双击退出程序
- SQLite入门介绍(三)
- 【Linux】——安装JDK
- unity中获取键盘响应值
- MongoDB 配置时无法连接 127.0.0.1:27017 问题解决方式
- mybatis3--6.动态sql
- LeetCode Week9: Binary Tree Preorder/InOrder/PostOrder Traversal