11570 | 2024-10-27 07:55:02 | chucknorris | Kiváló Számok | cpp17 | Accepted 100/100 | 61ms | 1336 KiB |
// NOTE: it is recommended to use this even if you don't understand the following code.
#include <fstream>
#include <iostream>
#include <vector>
using namespace std;
int main() {
// uncomment the following lines if you want to read/write from files
// ifstream cin("input.txt");
// ofstream cout("output.txt");
int N;
cin >> N;
// insert your code here
if(N == 1) cout << -1;
else{
if(N % 2 == 0){
for(int i = 1; i <= N/2; i++) cout << 15;
}
else if(N % 3 == 0){
for(int i = 1; i <= N; i++) cout << 1;
}
else if(N % 3 == 1){
cout << 55;
for(int i = 1; i <= N - 2; i++) cout << 1;
}
else if(N % 3 == 2){
cout << 5;
for(int i = 1; i <= N - 1; i++) cout << 1;
}
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 1ms | 500 KiB | ||||
subtask2 | 33/33 | ||||||
2 | Accepted | 1ms | 320 KiB | ||||
3 | Accepted | 1ms | 320 KiB | ||||
4 | Accepted | 1ms | 496 KiB | ||||
5 | Accepted | 1ms | 500 KiB | ||||
6 | Accepted | 1ms | 320 KiB | ||||
7 | Accepted | 1ms | 320 KiB | ||||
8 | Accepted | 1ms | 376 KiB | ||||
subtask3 | 33/33 | ||||||
9 | Accepted | 8ms | 568 KiB | ||||
10 | Accepted | 17ms | 824 KiB | ||||
11 | Accepted | 20ms | 856 KiB | ||||
12 | Accepted | 17ms | 812 KiB | ||||
13 | Accepted | 17ms | 672 KiB | ||||
14 | Accepted | 9ms | 480 KiB | ||||
15 | Accepted | 4ms | 452 KiB | ||||
16 | Accepted | 8ms | 564 KiB | ||||
17 | Accepted | 14ms | 592 KiB | ||||
18 | Accepted | 18ms | 816 KiB | ||||
19 | Accepted | 7ms | 568 KiB | ||||
20 | Accepted | 24ms | 928 KiB | ||||
subtask4 | 34/34 | ||||||
21 | Accepted | 61ms | 1336 KiB | ||||
22 | Accepted | 12ms | 568 KiB | ||||
23 | Accepted | 32ms | 1136 KiB | ||||
24 | Accepted | 34ms | 1240 KiB | ||||
25 | Accepted | 26ms | 1072 KiB | ||||
26 | Accepted | 14ms | 712 KiB | ||||
27 | Accepted | 27ms | 1040 KiB | ||||
28 | Accepted | 43ms | 1064 KiB | ||||
29 | Accepted | 8ms | 320 KiB | ||||
30 | Accepted | 37ms | 748 KiB | ||||
31 | Accepted | 19ms | 848 KiB | ||||
32 | Accepted | 1ms | 320 KiB | ||||
33 | Accepted | 6ms | 568 KiB |