11570 | 2024-10-27 07:55:02 | chucknorris | Kiváló Számok | cpp17 | Elfogadva 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;
}
Részfeladat | Összpont | Teszt | Verdikt | Idő | Memória | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Elfogadva | 1ms | 500 KiB | ||||
subtask2 | 33/33 | ||||||
2 | Elfogadva | 1ms | 320 KiB | ||||
3 | Elfogadva | 1ms | 320 KiB | ||||
4 | Elfogadva | 1ms | 496 KiB | ||||
5 | Elfogadva | 1ms | 500 KiB | ||||
6 | Elfogadva | 1ms | 320 KiB | ||||
7 | Elfogadva | 1ms | 320 KiB | ||||
8 | Elfogadva | 1ms | 376 KiB | ||||
subtask3 | 33/33 | ||||||
9 | Elfogadva | 8ms | 568 KiB | ||||
10 | Elfogadva | 17ms | 824 KiB | ||||
11 | Elfogadva | 20ms | 856 KiB | ||||
12 | Elfogadva | 17ms | 812 KiB | ||||
13 | Elfogadva | 17ms | 672 KiB | ||||
14 | Elfogadva | 9ms | 480 KiB | ||||
15 | Elfogadva | 4ms | 452 KiB | ||||
16 | Elfogadva | 8ms | 564 KiB | ||||
17 | Elfogadva | 14ms | 592 KiB | ||||
18 | Elfogadva | 18ms | 816 KiB | ||||
19 | Elfogadva | 7ms | 568 KiB | ||||
20 | Elfogadva | 24ms | 928 KiB | ||||
subtask4 | 34/34 | ||||||
21 | Elfogadva | 61ms | 1336 KiB | ||||
22 | Elfogadva | 12ms | 568 KiB | ||||
23 | Elfogadva | 32ms | 1136 KiB | ||||
24 | Elfogadva | 34ms | 1240 KiB | ||||
25 | Elfogadva | 26ms | 1072 KiB | ||||
26 | Elfogadva | 14ms | 712 KiB | ||||
27 | Elfogadva | 27ms | 1040 KiB | ||||
28 | Elfogadva | 43ms | 1064 KiB | ||||
29 | Elfogadva | 8ms | 320 KiB | ||||
30 | Elfogadva | 37ms | 748 KiB | ||||
31 | Elfogadva | 19ms | 848 KiB | ||||
32 | Elfogadva | 1ms | 320 KiB | ||||
33 | Elfogadva | 6ms | 568 KiB |