229202026-01-16 08:54:56zoA sárkány feladványa (50)cpp17Time limit exceeded 15/50300ms508 KiB
#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    int a,b,c,d,e,f,g,h,j,  i;
    long long s,x,z;
    int q,w;
    int vivi=0;
    s=-1;
    x=-1;
    z=-1;
    //int t[n];
    cin>>a>>b>>c;
    cin>>d>>e>>f;
    cin>>g>>h>>j;
    for(i=pow(10,c-1); i<pow(10,c); i++)

    {
        if (i%a==0 and i%b==0 and q<1)
        {
            s=i;
            //cout<<i<<endl;
            q++;
        }
    }
    cout<<s<<endl;
    for(i=pow(10,f-1); i<pow(10,f); i++)
    {
        if (i%d==0 and i%e==0 and vivi<1)
        {
            x=i;
            vivi++;
        }
    }
    cout<<x<<endl;
    for(i=pow(10,j-1); i<pow(10,j); i++)
    {
        if (i%g==0 and i%h==0 and w<1)
        {
            z=i;
            w++;
        }
    }
    cout<<z<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base15/50
1Time limit exceeded0/0284ms508 KiB
2Time limit exceeded0/0284ms316 KiB
3Accepted3/31ms316 KiB
4Accepted3/37ms316 KiB
5Accepted3/34ms316 KiB
6Accepted3/34ms316 KiB
7Accepted3/31ms316 KiB
8Time limit exceeded0/3300ms316 KiB
9Time limit exceeded0/3300ms316 KiB
10Time limit exceeded0/3287ms316 KiB
11Time limit exceeded0/3287ms316 KiB
12Time limit exceeded0/3275ms508 KiB
13Time limit exceeded0/4300ms400 KiB
14Time limit exceeded0/4280ms500 KiB
15Time limit exceeded0/4280ms316 KiB
16Time limit exceeded0/4291ms316 KiB
17Time limit exceeded0/4284ms316 KiB