114982024-10-13 10:00:10ncsKiváló Számokcpp17Wrong answer 0/1008ms2476 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();
    cout<<"test!!!";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer1ms320 KiB
subtask20/33
2Wrong answer1ms380 KiB
3Wrong answer1ms320 KiB
4Wrong answer1ms320 KiB
5Wrong answer1ms320 KiB
6Wrong answer1ms320 KiB
7Wrong answer1ms500 KiB
8Wrong answer1ms320 KiB
subtask30/33
9Wrong answer3ms968 KiB
10Wrong answer4ms1296 KiB
11Wrong answer6ms1536 KiB
12Wrong answer4ms1492 KiB
13Wrong answer4ms1516 KiB
14Wrong answer3ms980 KiB
15Wrong answer2ms580 KiB
16Wrong answer3ms968 KiB
17Wrong answer4ms1076 KiB
18Wrong answer4ms1520 KiB
19Wrong answer2ms916 KiB
20Wrong answer7ms1752 KiB
subtask40/34
21Wrong answer8ms2284 KiB
22Wrong answer2ms712 KiB
23Wrong answer8ms2476 KiB
24Wrong answer8ms2396 KiB
25Wrong answer7ms2028 KiB
26Wrong answer4ms1296 KiB
27Wrong answer7ms2064 KiB
28Wrong answer6ms1776 KiB
29Wrong answer2ms572 KiB
30Wrong answer6ms1520 KiB
31Wrong answer6ms1596 KiB
32Wrong answer1ms320 KiB
33Wrong answer1ms568 KiB