44602023-03-28 11:30:59semmiA sárkány feladványa (50)cpp17Wrong answer 15/503ms4096 KiB
#include <bits/stdc++.h>

using namespace std;


int main() {
    vector<string> ans;
    for(int i = 0;i < 3;i++ ) {
        long long a, b, c;
        cin >> a >> b >> c;
        long long f = a/__gcd(a, b)*b/__gcd(a,b) * __gcd(a, b);
        string x = to_string(f);
        if(x.size() > c) ans.push_back("-1");
        else {
            for(int i = 0;i < c-x.size();i++ ) x.push_back('0');
            ans.push_back(x);
        }
    }
    for(int i = 0;i < 3;i++ ) cout << ans[i] << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base15/50
1Wrong answer0/03ms1808 KiB
2Wrong answer0/03ms2004 KiB
3Accepted3/33ms2220 KiB
4Wrong answer0/33ms2436 KiB
5Accepted3/33ms2636 KiB
6Accepted3/33ms2856 KiB
7Accepted3/33ms2960 KiB
8Accepted3/33ms3164 KiB
9Wrong answer0/33ms3252 KiB
10Wrong answer0/33ms3256 KiB
11Wrong answer0/33ms3404 KiB
12Wrong answer0/33ms3524 KiB
13Wrong answer0/43ms3736 KiB
14Wrong answer0/43ms3944 KiB
15Wrong answer0/43ms4096 KiB
16Wrong answer0/43ms4068 KiB
17Wrong answer0/42ms4072 KiB