117532024-11-09 02:00:06balintOszthatóság 31-gyelpython3Wrong answer 44/5017ms3312 KiB
def printdivisiblesby31(n: str):
    n = str(int(n[:-1]) - (int(n[-1]) * 3))
    if int(n) < 10:
        if n == "0":
            print("0", end="")
        return  # n == "0"
    print(n, end=" ")
    return printdivisiblesby31(n)


n = input()
print("IGEN" if int(n) % 31 == 0 else "NEM")
printdivisiblesby31(n)
SubtaskSumTestVerdictTimeMemory
base44/50
1Accepted0/016ms3132 KiB
2Accepted0/016ms2872 KiB
3Accepted3/316ms2872 KiB
4Accepted3/316ms3128 KiB
5Accepted4/416ms2928 KiB
6Accepted4/416ms2872 KiB
7Accepted4/416ms3312 KiB
8Accepted4/416ms2872 KiB
9Accepted4/416ms3312 KiB
10Accepted4/416ms3136 KiB
11Accepted4/416ms3128 KiB
12Wrong answer0/417ms3080 KiB
13Accepted4/416ms3116 KiB
14Accepted4/417ms3104 KiB
15Accepted2/214ms3124 KiB
16Wrong answer0/217ms3128 KiB