128442025-01-02 11:36:27PKBJárdakövezés (75 pont)cpp17Accepted 75/751ms508 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    int hossz;
    cin >> hossz;

    int harmas = hossz / 3;
    int maradek = hossz % 3;

    if (maradek % 2 != 0) {
        harmas--;
        maradek += 3;
    }

    int kettes = maradek / 2;

    cout << kettes << " " << harmas << endl;
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/01ms320 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms320 KiB
4Accepted3/31ms508 KiB
5Accepted3/31ms320 KiB
6Accepted3/31ms320 KiB
7Accepted3/31ms320 KiB
8Accepted4/41ms320 KiB
9Accepted4/41ms320 KiB
10Accepted4/41ms320 KiB
11Accepted4/41ms320 KiB
12Accepted4/41ms376 KiB
13Accepted4/41ms320 KiB
14Accepted4/41ms320 KiB
15Accepted4/41ms320 KiB
16Accepted4/41ms320 KiB
17Accepted4/41ms320 KiB
18Accepted4/41ms320 KiB
19Accepted4/41ms320 KiB
20Accepted4/41ms320 KiB
21Accepted4/41ms396 KiB
22Accepted4/41ms320 KiB