94432024-02-21 18:30:12Vkrisztian01Főzet készítéscpp11Time limit exceeded 0/50550ms10892 KiB
#include <iostream>
#include<set>
#include<algorithm>

using namespace std;

int gcd(int a,int b)
{
    if(b>a) swap(a,b);
    if(b!=0) return gcd(a%b,b);
    else return a;
}
int q,n,m,db,ossze,a;
set<pair<int,int> > seged;

int main()
{
    for(int l=250;l<=500;l++)
    {
        for(int k=l;k<=500;k++)
        {
            for(int i=1;i<=500;i++)
    {
        for(int j=1;j<=500;j++)
        {
            a=gcd(i,j);
            seged.insert(make_pair(i/a,j/a));
        }
    }
        }
    }

    cout<<seged.size();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Time limit exceeded0/0474ms8244 KiB
2Time limit exceeded0/0465ms8508 KiB
3Time limit exceeded0/3470ms8740 KiB
4Time limit exceeded0/2546ms9044 KiB
5Time limit exceeded0/3477ms9240 KiB
6Time limit exceeded0/2453ms9132 KiB
7Time limit exceeded0/3453ms9172 KiB
8Time limit exceeded0/2465ms9132 KiB
9Time limit exceeded0/3453ms9408 KiB
10Time limit exceeded0/2550ms9472 KiB
11Time limit exceeded0/2550ms10136 KiB
12Time limit exceeded0/2458ms10004 KiB
13Time limit exceeded0/2538ms10024 KiB
14Time limit exceeded0/2483ms10160 KiB
15Time limit exceeded0/2462ms10184 KiB
16Time limit exceeded0/2467ms10408 KiB
17Time limit exceeded0/2483ms10392 KiB
18Time limit exceeded0/2462ms10264 KiB
19Time limit exceeded0/2462ms10268 KiB
20Time limit exceeded0/3538ms10376 KiB
21Time limit exceeded0/3462ms10652 KiB
22Time limit exceeded0/3546ms10788 KiB
23Time limit exceeded0/3474ms10892 KiB