13002022-04-08 12:13:54fp3t3rOszthatóság 31-gyelpython3Wrong answer 28/5041ms13416 KiB
def v(n):
    return max(0, 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/041ms13292 KiB
2Accepted0/032ms13296 KiB
3Accepted3/332ms13312 KiB
4Accepted3/330ms13300 KiB
5Accepted4/430ms13380 KiB
6Wrong answer0/430ms13332 KiB
7Wrong answer0/429ms13300 KiB
8Accepted4/430ms13340 KiB
9Accepted4/429ms13416 KiB
10Wrong answer0/429ms13308 KiB
11Accepted4/430ms13284 KiB
12Wrong answer0/429ms13360 KiB
13Wrong answer0/430ms13412 KiB
14Accepted4/430ms13336 KiB
15Accepted2/229ms13356 KiB
16Wrong answer0/229ms13300 KiB