【Educational Codeforces Round 81 (Rated for Div. 2) A】Display The Number

Topic Link

【answer】


2 with priority stick to scrape 1.
If it is an odd number, with an extra 3 to 7 at the beginning Minato

[Code]

#include <bits/stdc++.h>
using namespace std;



int main(){
    #ifdef LOCAL_DEFINE
        freopen("E:\\rush.txt","r",stdin);
    #endif // LOCAL_DEFINE
    ios::sync_with_stdio(0),cin.tie(0);
    int T;
    cin >> T;
    while (T--){
        int n;
        cin >> n;
        if (n&1){
            cout<<7;
            n-=3;
        }
        for (int i = 1;i <= n/2;i++) cout<<1;
        cout<<endl;
    }
    return 0;
}

Guess you like

Origin www.cnblogs.com/AWCXV/p/12242089.html