78322024-01-11 12:34:09Albertstein99A sárkány feladványa (50)cpp17Wrong answer 0/503ms3712 KiB
#include <bits/stdc++.h>
using namespace std;

int main(){
    int t = 3;
    while(t--){
        int A, B, N;
        cin >> A >> B >> N;
        long long c = A * B / __gcd(A, B);
        string s = to_string(c);
        if(s.length() > N){
            cout << -1;
        }
        else{
            while(s.length() < N){
                s += "0";
            }
            cout << s;
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/03ms1960 KiB
2Wrong answer0/03ms2092 KiB
3Wrong answer0/32ms2172 KiB
4Wrong answer0/33ms2228 KiB
5Wrong answer0/32ms2308 KiB
6Wrong answer0/33ms2432 KiB
7Wrong answer0/32ms2440 KiB
8Wrong answer0/33ms2824 KiB
9Wrong answer0/33ms2800 KiB
10Wrong answer0/33ms3044 KiB
11Wrong answer0/33ms3296 KiB
12Wrong answer0/33ms3380 KiB
13Wrong answer0/43ms3372 KiB
14Wrong answer0/43ms3372 KiB
15Wrong answer0/43ms3500 KiB
16Wrong answer0/42ms3588 KiB
17Wrong answer0/43ms3712 KiB