65752023-12-12 11:27:33batyuGergő és a sárkánycpp17Wrong answer 0/100600ms4532 KiB
// Gergo_es_a_Sarkany.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <string>
#include <cmath>
int main()
{
    int N, D;
    std::cin >> N >> D;
    int megoldasok[2] = { -1,-1 };
    int temp = 0;
    int szam = D;
    int maradek = 0;
    while (szam <= std::pow(10, N) && temp <= 1)
    {
        int tsz = szam;
        szam += maradek;
        maradek = szam;
        if (szam >= std::pow(10, N - 1) && szam < std::pow(10, N))
            megoldasok[temp++] = szam;
    }
    if (megoldasok[0] == -1 || megoldasok[1] == -1)
        std::cout << "0 0";
    else
        std::cout << megoldasok[0] << " " << megoldasok[1];
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1964 KiB
2Accepted3ms2260 KiB
subtask20/8
3Accepted3ms2460 KiB
4Wrong answer3ms2700 KiB
5Accepted3ms2760 KiB
6Accepted3ms2916 KiB
subtask30/16
7Wrong answer3ms3056 KiB
8Accepted3ms3076 KiB
9Accepted3ms3196 KiB
10Wrong answer3ms3280 KiB
11Accepted3ms3320 KiB
subtask40/7
12Accepted3ms3408 KiB
13Wrong answer3ms3600 KiB
14Time limit exceeded565ms2932 KiB
subtask50/11
15Wrong answer3ms3744 KiB
16Time limit exceeded586ms3748 KiB
17Time limit exceeded587ms2984 KiB
18Accepted3ms3904 KiB
subtask60/58
19Time limit exceeded598ms3988 KiB
20Accepted3ms4168 KiB
21Accepted3ms4400 KiB
22Time limit exceeded600ms3408 KiB
23Time limit exceeded552ms3608 KiB
24Wrong answer3ms4532 KiB
25Time limit exceeded600ms3848 KiB
26Time limit exceeded542ms3964 KiB