Rezultati

Up. imeNalogaJezikRezultatČas oddaje
mag-2017 Hierarhija Python 3 0/100Napaka med izvajanjem / ob izhodu (RTE) 11. maj '17 @ 19:48

Test Točke Porabljen spomin Porabljen čas Status
#1 0/10 8,605 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 4, in <module>
    stnad= b//(a-b-1)
ZeroDivisionError: integer division or modulo by zero
#2 0/10 8,582 MiB 0,000 s Napačen odgovor
#3 0/10 8,598 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 4, in <module>
    stnad= b//(a-b-1)
ZeroDivisionError: integer division or modulo by zero
#4 0/10 8,621 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 16, in <module>
    ele=(ind//stnad)+1
ZeroDivisionError: integer division or modulo by zero
#5 0/10 8,664 MiB 0,000 s Napačen odgovor
#6 0/10 8,633 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 16, in <module>
    ele=(ind//stnad)+1
ZeroDivisionError: integer division or modulo by zero
#7 0/10 8,609 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 4, in <module>
    stnad= b//(a-b-1)
ZeroDivisionError: integer division or modulo by zero
#8 0/10 8,617 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 16, in <module>
    ele=(ind//stnad)+1
ZeroDivisionError: integer division or modulo by zero
#9 0/10 8,641 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 16, in <module>
    ele=(ind//stnad)+1
ZeroDivisionError: integer division or modulo by zero
#10 10/10 8,688 MiB 0,000 s OK

Ocenjevani program (hirarhija.py):
a, b =list(map(int,input().split()))

vrni=""
stnad= b//(a-b-1)
i=2
napisan=[]
slov=dict()
if b==a-1:
    print(b*"1")
else:
    navoljo=[i for i in range(2,a-b+1)]
    delavci=[i for i in range(a-b,a+1)]
    ind=1
    for delav in delavci:
        ind+=1
        ele=(ind//stnad)+1
        if ele in navoljo:
            slov[delav]=(ind//stnad)+1
        else:
            slov[delav]=1
    for el in navoljo:
        slov[el]=1

for i in range(2,a+1):
    vrni+=str(slov[i])+" "
print(vrni)