11426 | 2024-09-15 13:26:33 | Csongi | Kiváló Számok | cpp17 | Accepted 100/100 | 46ms | 1440 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
if (n == 1)
{
cout << -1 << endl;
}
else if (n % 3 == 0)
{
for (int i = 0; i < n; i++)
{
cout << 5;
}
}
else if (n % 3 == 1)
{
for (int i = 0; i < n - 2; i++)
{
cout << 1;
}
cout << 55 << endl;
}
else
{
for (int i = 0; i < n - 1; i++)
{
cout << 1;
}
cout << 5 << endl;
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 2ms | 360 KiB | ||||
subtask2 | 33/33 | ||||||
2 | Accepted | 2ms | 360 KiB | ||||
3 | Accepted | 3ms | 492 KiB | ||||
4 | Accepted | 3ms | 360 KiB | ||||
5 | Accepted | 3ms | 504 KiB | ||||
6 | Accepted | 2ms | 376 KiB | ||||
7 | Accepted | 2ms | 360 KiB | ||||
8 | Accepted | 3ms | 496 KiB | ||||
subtask3 | 33/33 | ||||||
9 | Accepted | 13ms | 544 KiB | ||||
10 | Accepted | 25ms | 852 KiB | ||||
11 | Accepted | 29ms | 1144 KiB | ||||
12 | Accepted | 24ms | 872 KiB | ||||
13 | Accepted | 25ms | 832 KiB | ||||
14 | Accepted | 14ms | 540 KiB | ||||
15 | Accepted | 7ms | 488 KiB | ||||
16 | Accepted | 12ms | 656 KiB | ||||
17 | Accepted | 19ms | 616 KiB | ||||
18 | Accepted | 27ms | 1000 KiB | ||||
19 | Accepted | 12ms | 624 KiB | ||||
20 | Accepted | 34ms | 1128 KiB | ||||
subtask4 | 34/34 | ||||||
21 | Accepted | 46ms | 1440 KiB | ||||
22 | Accepted | 9ms | 488 KiB | ||||
23 | Accepted | 45ms | 1408 KiB | ||||
24 | Accepted | 46ms | 1340 KiB | ||||
25 | Accepted | 35ms | 1128 KiB | ||||
26 | Accepted | 19ms | 784 KiB | ||||
27 | Accepted | 37ms | 1256 KiB | ||||
28 | Accepted | 32ms | 1144 KiB | ||||
29 | Accepted | 8ms | 412 KiB | ||||
30 | Accepted | 28ms | 1000 KiB | ||||
31 | Accepted | 28ms | 912 KiB | ||||
32 | Accepted | 3ms | 360 KiB | ||||
33 | Accepted | 6ms | 488 KiB |