117542024-11-09 02:02:17balintOszthatóság 31-gyelpython3Wrong answer 44/5017ms3316 KiB
def printdivisiblesby31(n: str):
    if int(n) < 10:
        if n == "0":
            print("0", end="")
        return  # n == "0"
    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/016ms3316 KiB
2Accepted0/016ms3124 KiB
3Accepted3/316ms3128 KiB
4Accepted3/316ms3064 KiB
5Accepted4/416ms3116 KiB
6Accepted4/417ms3136 KiB
7Accepted4/416ms3000 KiB
8Accepted4/416ms3024 KiB
9Accepted4/416ms3068 KiB
10Accepted4/416ms3144 KiB
11Accepted4/416ms3116 KiB
12Wrong answer0/416ms3144 KiB
13Accepted4/416ms3136 KiB
14Accepted4/416ms3124 KiB
15Accepted2/216ms2872 KiB
16Wrong answer0/216ms3116 KiB