6551 | 2023-12-08 23:17:17 | mmated | Kiváló Számok | cpp17 | Accepted 100/100 | 10ms | 6640 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;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1828 KiB | ||||
subtask2 | 33/33 | ||||||
2 | Accepted | 3ms | 2200 KiB | ||||
3 | Accepted | 3ms | 2328 KiB | ||||
4 | Accepted | 3ms | 2508 KiB | ||||
5 | Accepted | 3ms | 2480 KiB | ||||
6 | Accepted | 3ms | 2612 KiB | ||||
7 | Accepted | 3ms | 2824 KiB | ||||
8 | Accepted | 3ms | 3032 KiB | ||||
subtask3 | 33/33 | ||||||
9 | Accepted | 4ms | 3944 KiB | ||||
10 | Accepted | 7ms | 4464 KiB | ||||
11 | Accepted | 8ms | 5500 KiB | ||||
12 | Accepted | 7ms | 4716 KiB | ||||
13 | Accepted | 7ms | 5384 KiB | ||||
14 | Accepted | 4ms | 4600 KiB | ||||
15 | Accepted | 4ms | 3920 KiB | ||||
16 | Accepted | 4ms | 4148 KiB | ||||
17 | Accepted | 6ms | 4472 KiB | ||||
18 | Accepted | 8ms | 5340 KiB | ||||
19 | Accepted | 4ms | 4272 KiB | ||||
20 | Accepted | 8ms | 5752 KiB | ||||
subtask4 | 34/34 | ||||||
21 | Accepted | 10ms | 5856 KiB | ||||
22 | Accepted | 4ms | 4764 KiB | ||||
23 | Accepted | 10ms | 6368 KiB | ||||
24 | Accepted | 10ms | 6268 KiB | ||||
25 | Accepted | 8ms | 6360 KiB | ||||
26 | Accepted | 6ms | 5648 KiB | ||||
27 | Accepted | 8ms | 6500 KiB | ||||
28 | Accepted | 8ms | 6640 KiB | ||||
29 | Accepted | 4ms | 4972 KiB | ||||
30 | Accepted | 8ms | 6516 KiB | ||||
31 | Accepted | 8ms | 6536 KiB | ||||
32 | Accepted | 3ms | 4616 KiB | ||||
33 | Accepted | 3ms | 4972 KiB |