115702024-10-27 07:55:02chucknorrisKiváló Számokcpp17Accepted 100/10061ms1336 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms500 KiB
subtask233/33
2Accepted1ms320 KiB
3Accepted1ms320 KiB
4Accepted1ms496 KiB
5Accepted1ms500 KiB
6Accepted1ms320 KiB
7Accepted1ms320 KiB
8Accepted1ms376 KiB
subtask333/33
9Accepted8ms568 KiB
10Accepted17ms824 KiB
11Accepted20ms856 KiB
12Accepted17ms812 KiB
13Accepted17ms672 KiB
14Accepted9ms480 KiB
15Accepted4ms452 KiB
16Accepted8ms564 KiB
17Accepted14ms592 KiB
18Accepted18ms816 KiB
19Accepted7ms568 KiB
20Accepted24ms928 KiB
subtask434/34
21Accepted61ms1336 KiB
22Accepted12ms568 KiB
23Accepted32ms1136 KiB
24Accepted34ms1240 KiB
25Accepted26ms1072 KiB
26Accepted14ms712 KiB
27Accepted27ms1040 KiB
28Accepted43ms1064 KiB
29Accepted8ms320 KiB
30Accepted37ms748 KiB
31Accepted19ms848 KiB
32Accepted1ms320 KiB
33Accepted6ms568 KiB