210542026-01-12 10:22:42badamA sárkány feladványa (50)cpp17Wrong answer 0/502ms508 KiB
#include <iostream>
#include <numeric>
#include <cmath>
#include <algorithm>
using namespace std;

int main()
{
    int n, a, b;
    cin >> a >> b >> n;
    int x=lcm(a,b);
    int y=pow(10,n-1);
    int z=pow(10,n);
    if(floor(z/x)==floor(y/x)) cout << -1;
    else cout << (floor(y/x)+1)*x;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/02ms316 KiB
2Wrong answer0/02ms316 KiB
3Wrong answer0/32ms316 KiB
4Wrong answer0/32ms316 KiB
5Wrong answer0/31ms316 KiB
6Wrong answer0/31ms508 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms332 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/31ms316 KiB
11Wrong answer0/31ms508 KiB
12Wrong answer0/31ms316 KiB
13Wrong answer0/41ms316 KiB
14Wrong answer0/41ms508 KiB
15Wrong answer0/41ms316 KiB
16Wrong answer0/41ms316 KiB
17Wrong answer0/41ms316 KiB