98142024-03-07 10:25:17EsVagyGergő és a sárkánycpp17Wrong answer 24/1003ms4920 KiB
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <climits>
#include <queue>
#include <fstream>
#include <sstream>
#include <math.h>
#include <list>

using namespace std;
using ll = long long;


int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int n, d;
    cin >> n >> d;
    n--;
    long long fnum = 1;
    long long rem = 0;
    for (size_t i = 0; i < n; i++)
    {
        fnum *= 10;
    }
    int magnitude = fnum;
    rem = fnum % d;
    rem = d - rem;
    fnum += rem;
    int secnum = fnum + d;
    if (secnum >= 10 * magnitude) {
        cout << "0 0";
        return 0;
    }
    else cout << fnum << " " << secnum;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1888 KiB
2Accepted3ms2124 KiB
subtask28/8
3Accepted3ms2336 KiB
4Accepted3ms2564 KiB
5Accepted3ms2748 KiB
6Accepted3ms2840 KiB
subtask316/16
7Accepted3ms2844 KiB
8Accepted3ms3340 KiB
9Accepted3ms3168 KiB
10Accepted3ms3208 KiB
11Accepted3ms3416 KiB
subtask40/7
12Accepted3ms3648 KiB
13Accepted3ms3868 KiB
14Wrong answer3ms4220 KiB
subtask50/11
15Accepted3ms4240 KiB
16Wrong answer3ms4388 KiB
17Wrong answer3ms4492 KiB
18Accepted3ms4588 KiB
subtask60/58
19Wrong answer3ms4696 KiB
20Accepted3ms4700 KiB
21Accepted3ms4832 KiB
22Wrong answer3ms4920 KiB
23Wrong answer3ms4900 KiB
24Wrong answer3ms4812 KiB
25Wrong answer3ms4808 KiB
26Wrong answer3ms4820 KiB