Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int t;
- scanf("%d", &t);
- while(t--)
- {
- int n, i;
- scanf("%d", &n);
- if(n % 2 == 0)
- {
- for(i = 0; i < n/2; i++) printf("1");
- printf("\n");
- }
- else
- {
- printf("7");
- for(i = 0; i < (n - 3) / 2; i++) printf("1");
- printf("\n");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement