91922024-02-17 20:41:09NagyLeoA sárkány feladványa (50)python3Time limit exceeded 15/50300ms12460 KiB
from math import gcd


def main():
    for _ in range(3):
        a = False
        A, B, N = map(int, input().split())
        for i in range(10 ** (N - 1), 10 ** (N)):
            if i % A == 0 and i % B == 0:
                print(i)
                a = True
                break
        if not a:
            print("-1")


main()
SubtaskSumTestVerdictTimeMemory
base15/50
1Accepted0/017ms11320 KiB
2Time limit exceeded0/0300ms3984 KiB
3Accepted3/317ms11684 KiB
4Accepted3/318ms12256 KiB
5Accepted3/317ms12460 KiB
6Accepted3/319ms12236 KiB
7Accepted3/318ms12340 KiB
8Time limit exceeded0/3252ms4712 KiB
9Time limit exceeded0/3266ms5012 KiB
10Time limit exceeded0/3270ms4964 KiB
11Time limit exceeded0/3268ms5316 KiB
12Time limit exceeded0/3270ms5388 KiB
13Time limit exceeded0/4280ms5656 KiB
14Time limit exceeded0/4252ms5868 KiB
15Time limit exceeded0/4250ms5912 KiB
16Time limit exceeded0/4263ms5840 KiB
17Time limit exceeded0/4259ms5840 KiB