11500 | 2024-10-13 19:34:22 | mraron | Kiváló Számok | cpp17 | Accepted 100/100 | 8ms | 2332 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 | 1ms | 508 KiB | ||||
subtask2 | 33/33 | ||||||
2 | Accepted | 1ms | 320 KiB | ||||
3 | Accepted | 1ms | 320 KiB | ||||
4 | Accepted | 1ms | 424 KiB | ||||
5 | Accepted | 1ms | 320 KiB | ||||
6 | Accepted | 1ms | 320 KiB | ||||
7 | Accepted | 1ms | 320 KiB | ||||
8 | Accepted | 1ms | 320 KiB | ||||
subtask3 | 33/33 | ||||||
9 | Accepted | 3ms | 968 KiB | ||||
10 | Accepted | 4ms | 1520 KiB | ||||
11 | Accepted | 4ms | 1724 KiB | ||||
12 | Accepted | 4ms | 1492 KiB | ||||
13 | Accepted | 4ms | 1516 KiB | ||||
14 | Accepted | 3ms | 1040 KiB | ||||
15 | Accepted | 2ms | 568 KiB | ||||
16 | Accepted | 2ms | 760 KiB | ||||
17 | Accepted | 4ms | 1068 KiB | ||||
18 | Accepted | 4ms | 1644 KiB | ||||
19 | Accepted | 2ms | 712 KiB | ||||
20 | Accepted | 6ms | 1776 KiB | ||||
subtask4 | 34/34 | ||||||
21 | Accepted | 8ms | 2332 KiB | ||||
22 | Accepted | 3ms | 716 KiB | ||||
23 | Accepted | 8ms | 2288 KiB | ||||
24 | Accepted | 8ms | 2288 KiB | ||||
25 | Accepted | 6ms | 2032 KiB | ||||
26 | Accepted | 4ms | 1236 KiB | ||||
27 | Accepted | 6ms | 2024 KiB | ||||
28 | Accepted | 6ms | 1820 KiB | ||||
29 | Accepted | 2ms | 568 KiB | ||||
30 | Accepted | 4ms | 1520 KiB | ||||
31 | Accepted | 4ms | 1592 KiB | ||||
32 | Accepted | 1ms | 332 KiB | ||||
33 | Accepted | 1ms | 572 KiB |