Rezultati

Up. imeNalogaJezikRezultatČas oddaje
dd8476 Prijateljske besede Python 3 0/100Napaka med izvajanjem / ob izhodu (RTE) 20. apr '17 @ 16:40

Test Točke Porabljen spomin Porabljen čas Status
#1 0/12 8,605 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 12, in <module>
    sys.stdout.write(min([hod(hodnik, 0), hod(hodnik, 1)]))
  File "source.py3", line 7, in hod
    stevc += 0 if int(a)==x else 1
ValueError: invalid literal for int() with base 10: 'b'
#2 0/12 8,621 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 12, in <module>
    sys.stdout.write(min([hod(hodnik, 0), hod(hodnik, 1)]))
  File "source.py3", line 7, in hod
    stevc += 0 if int(a)==x else 1
ValueError: invalid literal for int() with base 10: 'b'
#3 0/12 8,621 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 12, in <module>
    sys.stdout.write(min([hod(hodnik, 0), hod(hodnik, 1)]))
  File "source.py3", line 7, in hod
    stevc += 0 if int(a)==x else 1
ValueError: invalid literal for int() with base 10: 'b'
#4 0/12 8,598 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 12, in <module>
    sys.stdout.write(min([hod(hodnik, 0), hod(hodnik, 1)]))
  File "source.py3", line 7, in hod
    stevc += 0 if int(a)==x else 1
ValueError: invalid literal for int() with base 10: 'b'
#5 0/13 8,520 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 12, in <module>
    sys.stdout.write(min([hod(hodnik, 0), hod(hodnik, 1)]))
  File "source.py3", line 7, in hod
    stevc += 0 if int(a)==x else 1
ValueError: invalid literal for int() with base 10: 'b'
#6 0/13 8,594 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 12, in <module>
    sys.stdout.write(min([hod(hodnik, 0), hod(hodnik, 1)]))
  File "source.py3", line 7, in hod
    stevc += 0 if int(a)==x else 1
ValueError: invalid literal for int() with base 10: 'b'
#7 0/13 8,602 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 12, in <module>
    sys.stdout.write(min([hod(hodnik, 0), hod(hodnik, 1)]))
  File "source.py3", line 7, in hod
    stevc += 0 if int(a)==x else 1
ValueError: invalid literal for int() with base 10: 'b'
#8 0/13 8,637 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Traceback (most recent call last):
  File "source.py3", line 12, in <module>
    sys.stdout.write(min([hod(hodnik, 0), hod(hodnik, 1)]))
  File "source.py3", line 7, in hod
    stevc += 0 if int(a)==x else 1
ValueError: invalid literal for int() with base 10: 'b'

Ocenjevani program (hodnik.py):
import sys


def hod(hodnik, x):
    stevc = 0
    for a in hodnik:
        stevc += 0 if int(a)==x else 1
        x = 0 if x == 1 else 1
    return stevc

hodnik = str(sys.stdin.buffer.readline())
sys.stdout.write(min([hod(hodnik, 0), hod(hodnik, 1)]))