65512023-12-08 23:17:17mmatedKiváló Számokcpp17Accepted 100/10010ms6640 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n;
    cin>>n;
    if(n==1)
    {
        cout<<"-1\n";
        return;
    }
    string s=""; 
    if(n%3==1)
    {
        s+="1155";
        n-=4;
    }    
    else if(n%3==2)
    {
        s+="15";
        n-=2;
    }
    f(i,0,n)  s+="1";
    cout<<s<<"\n";
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1828 KiB
subtask233/33
2Accepted3ms2200 KiB
3Accepted3ms2328 KiB
4Accepted3ms2508 KiB
5Accepted3ms2480 KiB
6Accepted3ms2612 KiB
7Accepted3ms2824 KiB
8Accepted3ms3032 KiB
subtask333/33
9Accepted4ms3944 KiB
10Accepted7ms4464 KiB
11Accepted8ms5500 KiB
12Accepted7ms4716 KiB
13Accepted7ms5384 KiB
14Accepted4ms4600 KiB
15Accepted4ms3920 KiB
16Accepted4ms4148 KiB
17Accepted6ms4472 KiB
18Accepted8ms5340 KiB
19Accepted4ms4272 KiB
20Accepted8ms5752 KiB
subtask434/34
21Accepted10ms5856 KiB
22Accepted4ms4764 KiB
23Accepted10ms6368 KiB
24Accepted10ms6268 KiB
25Accepted8ms6360 KiB
26Accepted6ms5648 KiB
27Accepted8ms6500 KiB
28Accepted8ms6640 KiB
29Accepted4ms4972 KiB
30Accepted8ms6516 KiB
31Accepted8ms6536 KiB
32Accepted3ms4616 KiB
33Accepted3ms4972 KiB