Rezultati

Up. imeNalogaJezikRezultatČas oddaje
ayy-banananjam-2019 Ocenjevanje univerz Python 3 0/100Napačen odgovor (WA) 24. apr '19 @ 19:05

Test Točke Porabljen spomin Porabljen čas Status
#1 [več] 10/10 10,090 MiB 0,002 s OK
#2 [več] 10/10 11,398 MiB 0,295 s OK
#3 [več] 10/10 8,676 MiB 0,000 s OK
#4 [več] 10/10 10,066 MiB 0,000 s OK
#5 [več] 10/10 9,152 MiB 0,000 s OK
#6 [več] 10/10 10,109 MiB 0,000 s OK
#7 [več] 10/10 11,703 MiB 0,401 s OK
#8 [več] 10/10 11,703 MiB 0,436 s OK
#9 [več] 10/10 9,148 MiB 0,000 s OK
#10 [več] 0/10 8,590 MiB 0,000 s Napačen odgovor

Ocenjevani program (univerze.py):
n = int(input())

a1, b1 = [int(b) for b in input().strip().split(' ')]

wantmore = [0]
wantless = [1]
for i in range(n-1):
    a2, b2 = [int(b) for b in input().strip().split(' ')]
    aaaaa = a2 - b2 - a1 + b1
    if aaaaa == 0:
        print('Slabe metrike')
        exit()
    elif aaaaa > 0:
        wantless.append((b1 - b2)/aaaaa)
    else:
        wantmore.append((b1 - b2)/aaaaa)

minless = min(wantless)
maxmore = max(wantmore)
if minless < 0 or maxmore > 1 or minless < maxmore:
    print('Slabe metrike')
    exit()
best = (minless + maxmore) / 2
print(best, 1-best)