12992022-04-08 12:12:18fp3t3rOszthatóság 31-gyelpython3Wrong answer 28/5039ms13368 KiB
def v(n):
    return n//10-3*(n%10)

def oszt(m):
    if m[1] < 31:
        return m
    else:
        return oszt((m, v(m[1])))

def main():
    m = oszt((0,int(input())))
    print('IGEN' if m[1] == 0 else 'NEM')
    l = (0, 0)
    while m != 0:
        l = (l, m[1])
        m = m[0]
    l = l[0]
    while l[0] != 0:
        print(l[1], end = ' ')
        l = l[0]
    
main()  
SubtaskSumTestVerdictTimeMemory
base28/50
1Accepted0/039ms13188 KiB
2Accepted0/029ms13160 KiB
3Accepted3/330ms13268 KiB
4Accepted3/329ms13332 KiB
5Accepted4/429ms13324 KiB
6Wrong answer0/430ms13268 KiB
7Wrong answer0/439ms13232 KiB
8Accepted4/432ms13316 KiB
9Accepted4/428ms13356 KiB
10Wrong answer0/428ms13276 KiB
11Accepted4/428ms13320 KiB
12Wrong answer0/428ms13368 KiB
13Wrong answer0/429ms13288 KiB
14Accepted4/429ms13312 KiB
15Accepted2/229ms13360 KiB
16Wrong answer0/229ms13340 KiB