94102024-02-21 14:00:11PallanekPéterA sárkány feladványa (50)cpp17Wrong answer 0/503ms3724 KiB
#include <bits/stdc++.h>
using namespace std;

int main(){
    for (int i=0;i<3;i++){
        long long a,b,n;
        cin >> a >> b >> n;
        long long v=(a*b)/__gcd(a,b);
        string ki=to_string(v); int kiv=ki.size();
        if (kiv>n) cout << -1 << "\n";
        else{
            for (int i=0;i<=n-(kiv);i++){
                ki+='0';
            }
            cout << ki << "\n";
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/03ms1812 KiB
2Wrong answer0/03ms2008 KiB
3Wrong answer0/33ms2088 KiB
4Wrong answer0/33ms2232 KiB
5Wrong answer0/33ms2468 KiB
6Wrong answer0/33ms2648 KiB
7Wrong answer0/33ms2864 KiB
8Wrong answer0/32ms2944 KiB
9Wrong answer0/33ms2944 KiB
10Wrong answer0/33ms3076 KiB
11Wrong answer0/33ms3288 KiB
12Wrong answer0/33ms3404 KiB
13Wrong answer0/43ms3372 KiB
14Wrong answer0/42ms3372 KiB
15Wrong answer0/43ms3524 KiB
16Wrong answer0/43ms3588 KiB
17Wrong answer0/43ms3724 KiB