114242024-09-15 13:23:12CsongiKiváló Számokcpp17Wrong answer 0/10052ms3296 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    if (n < 3)
    {
        cout << 15 << endl;
    }
    else
    {
        if (n % 3 == 0)
        {
            for (int i = 0; i < n; i++)
            {
                cout << 555;
            }
        }
        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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted2ms232 KiB
subtask20/33
2Accepted3ms412 KiB
3Accepted3ms360 KiB
4Wrong answer3ms360 KiB
5Accepted3ms360 KiB
6Accepted3ms360 KiB
7Wrong answer3ms364 KiB
8Accepted2ms232 KiB
subtask30/33
9Wrong answer14ms1048 KiB
10Accepted25ms836 KiB
11Wrong answer32ms2192 KiB
12Accepted25ms892 KiB
13Accepted26ms912 KiB
14Accepted14ms616 KiB
15Accepted8ms488 KiB
16Wrong answer13ms1140 KiB
17Wrong answer21ms1512 KiB
18Accepted28ms756 KiB
19Accepted10ms616 KiB
20Accepted35ms1088 KiB
subtask40/34
21Accepted46ms1200 KiB
22Accepted10ms632 KiB
23Accepted46ms1384 KiB
24Wrong answer52ms3296 KiB
25Wrong answer39ms2460 KiB
26Wrong answer23ms1552 KiB
27Accepted39ms1092 KiB
28Accepted34ms1128 KiB
29Accepted8ms632 KiB
30Accepted28ms796 KiB
31Accepted28ms912 KiB
32Accepted3ms376 KiB
33Wrong answer7ms616 KiB