43502023-03-26 12:35:05rmlanA sárkány feladványa (50)cpp14Wrong answer 22/503ms4276 KiB
#include<bits/stdc++.h>
using namespace std;

int main(){

    int q=3;
    while(q--){
        int a,b,n;
        cin >> a >> b >> n;
        if((int)log10(a*b/__gcd(a,b)) >= n){
            cout << "-1\n";
            continue;
        }
        cout << a*b/__gcd(a,b);
        for(int i = 1; i < n-(int)log10(a*b/__gcd(a,b)); i++) cout << "0";
        cout << endl;
    }


}
SubtaskSumTestVerdictTimeMemory
base22/50
1Accepted0/03ms1876 KiB
2Wrong answer0/03ms2124 KiB
3Accepted3/32ms2332 KiB
4Accepted3/33ms2544 KiB
5Accepted3/33ms2760 KiB
6Accepted3/33ms3000 KiB
7Accepted3/33ms3212 KiB
8Wrong answer0/32ms3260 KiB
9Wrong answer0/33ms3460 KiB
10Wrong answer0/32ms3420 KiB
11Wrong answer0/33ms3552 KiB
12Accepted3/32ms3636 KiB
13Wrong answer0/43ms3768 KiB
14Accepted4/43ms4004 KiB
15Wrong answer0/43ms4096 KiB
16Wrong answer0/43ms4220 KiB
17Wrong answer0/43ms4276 KiB