78332024-01-11 12:35:02Albertstein99A sárkány feladványa (50)cpp17Wrong answer 22/503ms3780 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;
        }
        cout << endl;
    }
}
SubtaskSumTestVerdictTimeMemory
base22/50
1Accepted0/03ms1812 KiB
2Wrong answer0/03ms2000 KiB
3Accepted3/33ms2216 KiB
4Accepted3/33ms2428 KiB
5Accepted3/33ms2648 KiB
6Accepted3/33ms2852 KiB
7Accepted3/33ms2936 KiB
8Wrong answer0/33ms2936 KiB
9Wrong answer0/33ms3188 KiB
10Wrong answer0/33ms3272 KiB
11Wrong answer0/33ms3400 KiB
12Accepted3/33ms3640 KiB
13Wrong answer0/43ms3616 KiB
14Accepted4/43ms3684 KiB
15Wrong answer0/43ms3688 KiB
16Wrong answer0/43ms3704 KiB
17Wrong answer0/43ms3780 KiB