122462024-12-10 14:48:00CsongiA Négyszögletű Kerek Erdőcpp17Time limit exceeded 60/100300ms420 KiB
#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    ll n, a, b, s = 1; cin >> n >> a >> b;
    for (ll i = a; i != b; i++)
    {
        if (i == n)
        {
            i = 0;
        }
        s++;
    }
    if (s<5)
    {
        cout << "Tul konnyu!" << endl;
    }
    else
    {
        cout << s << endl;
    }
    
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms320 KiB
2Accepted1ms320 KiB
subtask240/40
3Accepted1ms320 KiB
4Accepted1ms320 KiB
5Accepted1ms320 KiB
6Accepted1ms320 KiB
7Accepted1ms324 KiB
8Accepted1ms320 KiB
9Accepted1ms320 KiB
subtask320/20
10Accepted1ms320 KiB
11Accepted1ms320 KiB
12Accepted1ms320 KiB
13Accepted1ms320 KiB
14Accepted1ms320 KiB
subtask40/40
15Time limit exceeded300ms356 KiB
16Accepted52ms320 KiB
17Accepted75ms420 KiB
18Accepted1ms320 KiB
19Accepted1ms320 KiB
20Time limit exceeded298ms320 KiB
21Time limit exceeded214ms320 KiB