113662024-08-27 20:44:04kukkermanJárdakövezés (75 pont)cpp17Accepted 75/754ms616 KiB
#include <iostream>

int beolvas(std::istream &be) {
    int n;
    be >> n;

    return n;
}

void feldolgoz(int n) {
    using std::cout;

    int kettesek, harmasok;
    switch (n % 3) {
    case 0:
        kettesek = 0;
        harmasok = n / 3;
        break;

    case 1:
        kettesek = 2;
        harmasok = n / 3 - 1;
        break;

    case 2:
        kettesek = 1;
        harmasok = n / 3;
        break;
    }

    cout << kettesek << ' ' << harmasok << '\n';
}

int main() {
    const auto n = beolvas(std::cin);
    feldolgoz(n);

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms400 KiB
2Accepted0/03ms532 KiB
3Accepted3/33ms528 KiB
4Accepted3/33ms516 KiB
5Accepted3/33ms404 KiB
6Accepted3/33ms436 KiB
7Accepted3/32ms360 KiB
8Accepted4/43ms616 KiB
9Accepted4/43ms376 KiB
10Accepted4/43ms360 KiB
11Accepted4/42ms360 KiB
12Accepted4/43ms384 KiB
13Accepted4/42ms404 KiB
14Accepted4/43ms444 KiB
15Accepted4/43ms488 KiB
16Accepted4/44ms376 KiB
17Accepted4/42ms504 KiB
18Accepted4/42ms504 KiB
19Accepted4/43ms376 KiB
20Accepted4/43ms504 KiB
21Accepted4/42ms360 KiB
22Accepted4/42ms364 KiB