111392024-07-07 15:34:15probaOszthatóság 17-tel (60 pont)python3Runtime error 47/6018ms3184 KiB
#17
#n = 132770
n, a = int(input()), []
#print(int(str(n)[:-1]), int(str(n)[-1])*5)


while (int(str(n)[:-1])-int(str(n)[-1])*5) > 0:
    n = (int(str(n)[:-1])-int(str(n)[-1])*5)
    a += [n]
    

print('IGEN' if n % 17 == 0 else 'NEM')
if (int(str(n)[:-1])-int(str(n)[-1])*5) == 0:
    print(0)
if len(a)==0:
    print('')
else:
    print(' '.join([str(i) for i in a]))



    
SubtaskSumTestVerdictTimeMemory
base47/60
1Accepted0/017ms3044 KiB
2Accepted0/017ms3044 KiB
3Runtime error0/317ms2960 KiB
4Accepted3/318ms3044 KiB
5Accepted4/417ms2964 KiB
6Accepted4/417ms2936 KiB
7Accepted4/417ms3044 KiB
8Accepted5/517ms2916 KiB
9Wrong answer0/517ms3044 KiB
10Accepted5/517ms3064 KiB
11Runtime error0/517ms3064 KiB
12Accepted6/617ms2988 KiB
13Accepted6/617ms2844 KiB
14Accepted6/617ms3184 KiB
15Accepted2/217ms2916 KiB
16Accepted2/217ms2940 KiB