ZhenlongDai/ACPR huggingface dataset:
Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print(sum(sorted(list(map(int,input().split()))[:2])))

Failing test case input:
46 24 0

Expected output:
24


Actual output:
70


Fixed submission (verdict: Accepted):
print(sum(sorted(list(map(int,input().split())))[:2]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P,Q,R = map(int,input().split())

a = P + Q
b = Q + R
c = R + P

if b > a and c > a:
  print(a)
elif b > c:
  print(c)
else:
  print(c)

Failing test case input:
46 38 -1

Expected output:
37


Actual output:
45


Fixed submission (verdict: Accepted):
P,Q,R = map(int,input().split())

a = P + Q
b = Q + R
c = R + P

if b > a and c > a:
  print(a)
elif b > c:
  print(c)
else:
  print(b)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
print (a[0] + a[1])

Failing test case input:
46 26 0

Expected output:
26


Actual output:
72


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
a.sort()
print (a[0] + a[1])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P, Q, R = map(int, input().split())

if (P + Q) >= (R + Q) and (P + Q) >= (R + P):
  print(P + Q)
elif (R + Q) >= (P + Q) and (R + Q) >= (R + P):
  print(R + Q)
elif (R + P) >= (P + Q) and (R + P) >= (P + Q):
  print(R + P)

Failing test case input:
101 -44 -7

Expected output:
-51


Actual output:
94


Fixed submission (verdict: Accepted):
P, Q, R = map(int, input().split())

if (P + Q) <= (R + Q) and (P + Q) <= (R + P):
  print(P + Q)
elif (R + Q) <= (P + Q) and (R + Q) <= (R + P):
  print(R + Q)
elif (R + P) <= (P + Q) and (R + P) <= (P + Q):
  print(R + P)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P,Q,R=map(int,input().split())
a=[]
a.append(P)
a.append(Q)
a.append(R)
print(a)
a.sort()
print(a[0]+a[1])

Failing test case input:
110 -39 0

Expected output:
-39


Actual output:
[110, -39, 0]
-39


Fixed submission (verdict: Accepted):
P,Q,R=map(int,input().split())
a=[]
a.append(P+Q)
a.append(P+R)
a.append(Q+R)
print(min(a))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l = set(map(int, input().split()))
print(sum(l)-max(l))

Failing test case input:
-126 1 1

Expected output:
-125


Actual output:
-126


Fixed submission (verdict: Accepted):
l = list(map(int, input().split()))
print(sum(l)-max(l))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a ,b ,c =map(int,input().split())
d= 0
if a + b > b + c :
        d = b + c
else:
    d = a + b

if d > a + c:
    d = a + d
print(d)


Failing test case input:
9 84 2

Expected output:
11


Actual output:
95


Fixed submission (verdict: Accepted):
a ,b ,c =map(int,input().split())
d = a + b
if a + b > b + c :
    d = b + c
if d > a + c:
    d = a + c
print(d)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P,Q,R = input().split()

print(min(P+Q,Q+R,R+P))

Failing test case input:
010 -10 -39

Expected output:
-49


Actual output:
-10-39


Fixed submission (verdict: Accepted):
P,Q,R = map(int,input().split())
 
print(min(P+Q,Q+R,R+P))
Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(map(int,input().split()))
s.sort
print(sum(s[:2]))



Failing test case input:
0 0 -11

Expected output:
-11


Actual output:
0


Fixed submission (verdict: Accepted):
s = list(map(int,input().split()))
s.sort()
print(sum(s[:2]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = input().split()
print(min(a+b,b+c,c+a))

Failing test case input:
010 -60 -5

Expected output:
-65


Actual output:
-5010


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())
print(min([a+b,b+c,c+a]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = map(int, input().split())
min = min(p, q, r)
print(p+q+r-min)

Failing test case input:
5 84 3

Expected output:
8


Actual output:
89


Fixed submission (verdict: Accepted):
p, q, r = map(int, input().split())
max = max(p, q, r)
print(p+q+r-max)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P,Q,R = map(int,input().split())
print(min([P+Q,Q+R,R+Q]))

Failing test case input:
33 38 -1

Expected output:
32


Actual output:
37


Fixed submission (verdict: Accepted):
P,Q,R = map(int,input().split())
print(min([P+Q,Q+R,R+P]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P,Q,R = map(int,input().split())

if P + R <= P + Q and P + R <= R + Q:
   answer = P + R
elif P + Q <= P + R and P + Q <= R + Q:
	answer = P + Q
elif R + Q <= P + R and R + Q <= R + Q:
	answer = P + Q
  
print(answer)

Failing test case input:
101 -44 -7

Expected output:
-51


Actual output:
57


Fixed submission (verdict: Accepted):
P,Q,R = map(int,input().split())

if P + R <= P + Q and P + R <= R + Q:
   answer = P + R
elif P + Q <= P + R and P + Q <= R + Q:
	answer = P + Q
elif R + Q <= P + R and R + Q <= R + Q:
	answer = R + Q
  
print(answer)

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
p,q,r=map(int,input().split())
if p+q<=q+r and p+q<=p+r:
    print(p+q)
if p+r<=p+q and p+r<=q+r:
    print(p+r)
if q+r<=p+r and q+r<=p+q:
    print(q+r)


Failing test case input:
1 1 -14

Expected output:
-13


Actual output:
-13
-13


Fixed submission (verdict: Accepted):
p,q,r=map(int,input().split())
if p>=q and p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(q+p)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
pqr = input().split()
for i in range(3):
     pqr[i] = int(pqr[i])
a = min(pqr[0]*pqr[1], pqr[1]*pqr[2], pqr[2]*pqr[0])
print(a)


Failing test case input:
3 -1 -2

Expected output:
-3


Actual output:
-6


Fixed submission (verdict: Accepted):
pqr = input().split()
for i in range(3):
     pqr[i] = int(pqr[i])
a = min(pqr[0]+pqr[1], pqr[1]+pqr[2], pqr[2]+pqr[0])
print(a)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p,q,r=[int(i) for i in input().split()]
print(min(p+q,q+r,q+r))


Failing test case input:
-28 1 -2

Expected output:
-30


Actual output:
-27


Fixed submission (verdict: Accepted):
p,q,r=[int(i) for i in input().split()]
print(min(p+q,q+r,p+r))
Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = map(int, input().split())
print(min(p+q, q+r, p+q))

Failing test case input:
21 24 2

Expected output:
23


Actual output:
26


Fixed submission (verdict: Accepted):
p, q, r = map(int, input().split())
print(min(p+q, q+r, p+r))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
T = list(map(int,input().split()))
print(T[0] + T[1])

Failing test case input:
-25 1 0

Expected output:
-25


Actual output:
-24


Fixed submission (verdict: Accepted):
T = sorted(list(map(int,input().split())))
print(T[0] + T[1])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = map(int, input().split())
print(max(p+q, q+r, r+p))

Failing test case input:
010 -10 -28

Expected output:
-38


Actual output:
0


Fixed submission (verdict: Accepted):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
P,Q,R = map(int,input().split())
print(min(R+Q,Q+R,R+P))

Failing test case input:
-60 1 2

Expected output:
-59


Actual output:
-58


Fixed submission (verdict: Accepted):
P,Q,R = map(int,input().split())
print(min(P+Q,Q+R,R+P))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = map(int, input().split())
print(p+q+r-min(p, q, r))

Failing test case input:
001 -10 -77

Expected output:
-87


Actual output:
-9


Fixed submission (verdict: Accepted):
p, q, r = map(int, input().split())
max = max(p, q, r)
print(p+q+r-max)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int, input().split()))

ans = 10**1000
tmp = 0

for i in range(3):
    for j in range(i+1, 2):
        tmp = A[i] + A[j]
        ans = min(ans, tmp)

print(ans)

Failing test case input:
001 -7 -77

Expected output:
-84


Actual output:
-6


Fixed submission (verdict: Accepted):
A = list(map(int, input().split()))

ans = 10**1000
tmp = 0

for i in range(2):
    for j in range(i+1, 3):
        tmp = A[i] + A[j]
        ans = min(ans, tmp)

print(ans)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p,q,r=map(int,input().split())
print(min(p+q,q+r))

Failing test case input:
33 38 -1

Expected output:
32


Actual output:
37


Fixed submission (verdict: Accepted):
p,q,r=map(int,input().split())
print(min(p+q,q+r,r+p))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = list(map(int, input().split()))

print(p + q + r -max(p, r, r))

Failing test case input:
18 24 2

Expected output:
20


Actual output:
26


Fixed submission (verdict: Accepted):
p, q, r = list(map(int, input().split()))

print(p + q + r -max(p, q, r))
Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    PQR = list(map(int, input().split()))
    newPQR = sorted(PQR)
    print(newPQR)
    arr = newPQR[:2]
    print(arr[0]+arr[1])
main()

Failing test case input:
010 -1 -36

Expected output:
-37


Actual output:
[-36, -1, 10]
-37


Fixed submission (verdict: Accepted):
def main():
    PQR = list(map(int, input().split()))
    newPQR = sorted(PQR)
    arr = newPQR[:2]
    print(arr[0]+arr[1])
main()

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(map(int,input().split()))
a.sort
print(a[0]+a[1])

Failing test case input:
000 -62 -7

Expected output:
-69


Actual output:
-62


Fixed submission (verdict: Accepted):
a=list(map(int,input().split()))
a.sort()
print(a[0]+a[1])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = input().split()
num = sorted([int(i) for i in num])

print(num[-1]+num[-2])

Failing test case input:
010 -62 -5

Expected output:
-67


Actual output:
5


Fixed submission (verdict: Accepted):
num = input().split()

num = [int(i) for i in num]
num_fix = sorted(num)
print(num_fix[0]+num_fix[1])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = map(int, input().split())
print(min([p + q, p + r, r + p]))


Failing test case input:
1 0 -6

Expected output:
-6


Actual output:
-5


Fixed submission (verdict: Accepted):
p, q, r = map(int, input().split())
print(min([p + q, q + r, r + p]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P, Q, R = map(int ,input().split())
print(max(P+Q, Q+R, R+P))

Failing test case input:
110 -39 0

Expected output:
-39


Actual output:
110


Fixed submission (verdict: Accepted):
P, Q, R = map(int ,input().split())
print(min(P+Q, Q+R, R+P))

Problem: p03011
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x=list(map(int,input().split()))
sorted(x)
print(x[0]+x[1])

Failing test case input:
3 1 0

Expected output:
1


Actual output:
4


Fixed submission (verdict: Accepted):
x=list(map(int,input().split()))
y=sorted(x)
print(y[0]+y[1])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P,Q,R=map(int, input().split())

PQ=P + Q
QR=Q + R
PR=P + R

print(min(PQ,QR,QR))

Failing test case input:
-28 1 -2

Expected output:
-30


Actual output:
-27


Fixed submission (verdict: Accepted):
P,Q,R=map(int, input().split())
PQ=P+Q
PR=P+R
QR=Q+R
QP=Q+P
RP=R+P
RQ=R+Q
print(min(PQ,QR,QR,QP,RP,RQ))
Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
try:
    n=list(map(int, input().strip().split()))

    lis1=[]
    for i in range(0,len(n)):
        for a in range(0,len(n)):
            if n[i]!=n[a]:
                z=int(n[a]+n[i])
                lis1.append(str(z))
               
    print(int(min(lis1)))
except:
    print('')



Failing test case input:
010 -10 -10

Expected output:
-20


Actual output:
0


Fixed submission (verdict: Accepted):
try:
    n=list(map(int, input().strip().split()))
    lis1=[]
    for i in range(0,len(n)):
        for a in range(0,len(n)):
            if a!=i:
                z=(int(n[a])+int(n[i]))
                lis1.append(z)
            
    minscore='9999999999'
    for i in range(0,len(lis1)):
        if float(minscore)>float(lis1[i]):
            minscore=lis1[i]
    
    print(minscore)
    
except:
    print('')

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
array = list(map(int, input().split()))
array.sort
print(sum(array[0:2]))

Failing test case input:
0 0 -14

Expected output:
-14


Actual output:
0


Fixed submission (verdict: Accepted):
array = list(map(int, input().split()))
array.sort
print(sum(array)-max(array))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = map(int, input().split())

min = p + q
if min > r + q:
    min = r + q

if min > p + r:
    min = p + r


Failing test case input:
3 1 2

Expected output:
3


Actual output:

Fixed submission (verdict: Accepted):
p, q, r = map(int, input().split())

min = p + q
if min > r + q:
    min = r + q

if min > p + r:
    min = p + r

print(min)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P = [int(x) for x in input().split()]

P.sort

print(P[0]+P[1])

Failing test case input:
46 38 -1

Expected output:
37


Actual output:
84


Fixed submission (verdict: Accepted):
P = [int(x) for x in input().split()]

P.sort()

print(P[0]+P[1])

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=list(map(int, input().strip().split()))

lis1=[]
for i in range(0,len(n)):
    for a in range(0,len(n)):
        if n[i]!=n[a]:
            z=(int(n[a])+int(n[i]))
            lis1.append(str(z))

minscore='9999999999'
for i in range(0,len(lis1)):
    if float(minscore)>float(lis1[i]):
        minscore=lis1[i]

print(minscore)



Failing test case input:
010 -10 -10

Expected output:
-20


Actual output:
0


Fixed submission (verdict: Accepted):
try:
    n=list(map(int, input().strip().split()))
    lis1=[]
    for i in range(0,len(n)):
        for a in range(0,len(n)):
            if a!=i:
                z=(int(n[a])+int(n[i]))
                lis1.append(z)
            
    minscore='9999999999'
    for i in range(0,len(lis1)):
        if float(minscore)>float(lis1[i]):
            minscore=lis1[i]
    
    print(minscore)
    
except:
    print('')
Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k=list(map(int,input().split()))
k.sort
print(int(k[0])+int(k[1]))

Failing test case input:
21 24 2

Expected output:
23


Actual output:
45


Fixed submission (verdict: Accepted):
k=list(map(int,input().split()))
k.sort()
print(int(k[0])+int(k[1]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

A = list(map(int,input().split()))


B =[A[0]+A[1],A[0]+A[2],A[1]+A[2]]
tmp = B[0]
for i in range(len(B)-1):
    if B[i]>=B[i+1]:
        tmp = B[i+1]


print(tmp)

Failing test case input:
1 -6 4

Expected output:
-5


Actual output:
-2


Fixed submission (verdict: Accepted):
A = list(map(int,input().split()))


B =[A[0]+A[1],A[0]+A[2],A[1]+A[2]]
tmp = B[0]
for i in range(len(B)):
    if tmp>=B[i]:
        tmp = B[i]


print(tmp)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
o = input()
o_list = o.split(" ")

p = int(o_list[0])
q = int(o_list[1])
r = int(o_list[2])
pq = p + q
qr = q + r
rp = r + p

if pq <= qr and pq <= rp:
    print(pq)
elif qr <= rp and qr <= pq:
    print(pq)
elif rp <= pq and rp <= qr:
    print(rp)


Failing test case input:
010 -39 -5

Expected output:
-44


Actual output:
-29


Fixed submission (verdict: Accepted):
o = input()
o_list = o.split(" ")

p = int(o_list[0])
q = int(o_list[1])
r = int(o_list[2])
pq = p + q
qr = q + r
rp = r + p

if pq <= qr and pq <= rp:
    print(pq)
elif qr <= rp and qr <= pq:
    print(qr)
elif rp <= pq and rp <= qr:
    print(rp)

Problem: p03011
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
l = LI()
print(l[0]+l[1])

Failing test case input:
-19 010 1

Expected output:
-18


Actual output:
-9


Fixed submission (verdict: Accepted):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
l = LI()
l.sort()
print(l[0]+l[1])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P, Q, R = map(int, input().split())
List =[P+Q, Q+R, R+P]
List.sort
print(List[0])

Failing test case input:
010 -10 -39

Expected output:
-49


Actual output:
0


Fixed submission (verdict: Accepted):
P, Q, R = map(int, input().split())
List =[P+Q, Q+R, R+P]
List.sort()
print(List[0])

Problem: p03011
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a_L = list(map(int,input().split()))
print(a_L[0]+a_L[1])


Failing test case input:
8 20 2

Expected output:
10


Actual output:
28


Fixed submission (verdict: Accepted):
a_L = list(map(int,input().split()))
a_L = sorted(a_L)
print(a_L[0]+a_L[1])
Problem: p03011
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
p,q,r = map(int, input().split())

print(min(p+min(q,r), p+r))

Failing test case input:
000 -62 -7

Expected output:
-69


Actual output:
-62


Fixed submission (verdict: Accepted):
p,q,r = map(int, input().split())

print(min(p+min(q,r), q+r))

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
try:
    n=list(map(int, input().strip().split()))

    lis1=[]
    for i in range(0,len(n)):
        for a in range(0,len(n)):
            if n[i]!=n[a]:
                z=int(n[a]+n[i])
                lis1.append(str(z))
               
    print(min(lis1))
except:
    print('')


Failing test case input:
010 -10 -65

Expected output:
-75


Actual output:
-55


Fixed submission (verdict: Accepted):
try:
    n=list(map(int, input().strip().split()))
    lis1=[]
    for i in range(0,len(n)):
        for a in range(0,len(n)):
            if a!=i:
                z=(int(n[a])+int(n[i]))
                lis1.append(z)
            
    minscore='9999999999'
    for i in range(0,len(lis1)):
        if float(minscore)>float(lis1[i]):
            minscore=lis1[i]
    
    print(minscore)
    
except:
    print('')

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
sum(sorted(list(map(int, input().split())))[:2])

Failing test case input:
001 -13 -101

Expected output:
-114


Actual output:

Fixed submission (verdict: Accepted):
print(sum(sorted(list(map(int, input().split())))[:2]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k=list(map(int,input().split()))
k.sort
print(k[2]+k[1])

Failing test case input:
-28 1 -2

Expected output:
-30


Actual output:
-1


Fixed submission (verdict: Accepted):
k=list(map(int,input().split()))
k.sort()
print(int(k[0])+int(k[1]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P, Q, R = map(int,input().split())
 
PQ = P + Q
QR = Q + R
RP = R + Q

temp1 = min(PQ, QR)
temp2 = min(temp1, RP)

print(temp2)

Failing test case input:
14 84 2

Expected output:
16


Actual output:
86


Fixed submission (verdict: Accepted):
P, Q, R = map(int,input().split())
 
PQ = P + Q
QR = Q + R
RP = R + P

temp1 = min(PQ, QR)
temp2 = min(temp1, RP)

print(temp2)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P,Q,R=map(int,input().split())
print(min(P+Q,Q+R))


Failing test case input:
33 38 -1

Expected output:
32


Actual output:
37


Fixed submission (verdict: Accepted):
P,Q,R=map(int,input().split())
print(min(P+Q,Q+R,P+R))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P, Q, R = map(int, input().split())
print(max(P + Q, Q + R, P + R))

Failing test case input:
011 -84 1

Expected output:
-83


Actual output:
12


Fixed submission (verdict: Accepted):
P, Q, R = map(int, input().split())
print(min(P + Q, Q + R, P + R))
Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
PQR = list(map(int, input().split()))
PQR.sort()
print(int(sum(PQR[:1])))


Failing test case input:
011 -10 -9

Expected output:
-19


Actual output:
-10


Fixed submission (verdict: Accepted):
PQR = list(map(int, input().split()))
PQR.sort()
print(int(sum(PQR[:2])))

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

p,q,r = map(int,input().split())
print(min(p+r,r+q))

Failing test case input:
-60 1 2

Expected output:
-59


Actual output:
-58


Fixed submission (verdict: Accepted):

p,q,r = map(int,input().split())
print(min(p+r,r+q,p+q))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if a+b <= a+c and a+b <= b+c:
    print(a+b)
elif a+c <= a+b and a+c <= b+c:
    print(a+b)
else:
    print(a+c)


Failing test case input:
001 -7 -77

Expected output:
-84


Actual output:
-76


Fixed submission (verdict: Accepted):
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if a+b <= a+c and a+b <= b+c:
    print(a+b)
elif a+c <= a+b and a+c <= b+c:
    print(a+c)
else:
    print(b+c)

Problem: p03011
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
P,Q,R = map(int,input().split())
min(P+Q,Q+R,P+R)

Failing test case input:
9 84 2

Expected output:
11


Actual output:

Fixed submission (verdict: Accepted):
P,Q,R = map(int,input().split())
print(min(P+Q,Q+R,P+R))

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c = [int(a) for a in input().split()]
print(a+b)


Failing test case input:
3 1 2

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
a,b,c = [int(a) for a in input().split()]
d = min(a+b,b+c,c+a)
print (d)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P,Q,R=map(int,input().split())

a=[P,Q,R]

b=sorted(a)

print(a[0]+a[1])

Failing test case input:
101 -63 1

Expected output:
-62


Actual output:
38


Fixed submission (verdict: Accepted):
P,Q,R=map(int,input().split())
 
a=[P,Q,R]
 
b=sorted(a)
 
print(b[0]+b[1])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p,q,r = map(int, input().split())
print(p+q, min(q+r, r+p))

Failing test case input:
101 -71 -6

Expected output:
-77


Actual output:
30 -77


Fixed submission (verdict: Accepted):
p,q,r = map(int, input().split())
print(min(p+q, min(q+r, r+p)))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P,Q,R = list(map(int, input().split()))
print(min(P,Q)+min(Q,R))


Failing test case input:
111 -63 -5

Expected output:
-68


Actual output:
-126


Fixed submission (verdict: Accepted):
s = list(map(int, input().split()))
s.sort()
print(sum(s[0:2]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p,q,r = map(int, input().split())
print(min(p+q, r))

Failing test case input:
101 -71 -7

Expected output:
-78


Actual output:
-7


Fixed submission (verdict: Accepted):
p,q,r = map(int, input().split())
print(min(p+q,q+r,r+p))
Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+q))

Failing test case input:
1 6 5

Expected output:
6


Actual output:
7


Fixed submission (verdict: Accepted):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
L = list(map(int, input().split()))
L.sort()
print(sum(L[1:]))

Failing test case input:
-28 1 -2

Expected output:
-30


Actual output:
-1


Fixed submission (verdict: Accepted):
L = list(map(int, input().split()))
L.sort()
print(sum(L[:-1]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = [int(i) for i in input().split()]
print(A[0] + A[1])


Failing test case input:
000 -62 -7

Expected output:
-69


Actual output:
-62


Fixed submission (verdict: Accepted):
A = [int(i) for i in input().split()]
print(sum(A) - max(A))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = map(int, input().split())
a = max(p, q, r)
print(a)
if a == p:
  print(q+r)
elif a == q:
  print(p+r)
elif a == r:
  print(p+q)

Failing test case input:
011 -23 1

Expected output:
-22


Actual output:
11
-22


Fixed submission (verdict: Accepted):
p, q, r = map(int, input().split())
a = max(p, q, r)
if a == p:
  print(q+r)
elif a == q:
  print(p+r)
elif a == r:
  print(p+q)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k=list(map(int,input().split()))
k.sort
print(k[0]+k[1])

Failing test case input:
010 -10 -18

Expected output:
-28


Actual output:
0


Fixed submission (verdict: Accepted):
k=list(map(int,input().split()))
k.sort()
print(int(k[0])+int(k[1]))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p = list(map(int,input().split()))

mn = 200
for i in p[:-2]:
    for j in p[i+1:]:
        if (i+j < mn):
            mn = i+j

print(mn)




Failing test case input:
46 26 0

Expected output:
26


Actual output:
200


Fixed submission (verdict: Accepted):
p = list(map(int,input().split()))

mn = 200
for i in range(2):
    for j in range(i+1,3):
        if (p[i]+p[j] < mn):
            mn = p[i]+p[j]

print(mn)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p,q,r=map(int,input().split())
print(p+q)

Failing test case input:
011 -5 -101

Expected output:
-106


Actual output:
6


Fixed submission (verdict: Accepted):
p,q,r=map(int,input().split())
print(min((p+q),(p+r),(q+r)))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p, q, r = map(int,input().split())
print(min(p+q, q+r, r+q))

Failing test case input:
21 24 2

Expected output:
23


Actual output:
26


Fixed submission (verdict: Accepted):
p, q, r = map(int,input().split())
print(min(p+q, q+r, r+p))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
PQR=list(map(int,input().split()))
sorted(PQR)
print(PQR[1]+PQR[2])





Failing test case input:
21 24 2

Expected output:
23


Actual output:
26


Fixed submission (verdict: Accepted):
PQR=list(map(int,input().split()))
PQR.sort()
print(PQR[1]+PQR[0])
Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P, Q, R = list(map(int, input().split()))
if P+Q < P+R and P+Q < Q+R:
    print(P+Q)
elif P+R < P+Q and P+R < Q+R:
    print(P+R)
else:
    print(Q+R)
    

Failing test case input:
-74 1 1

Expected output:
-73


Actual output:
2


Fixed submission (verdict: Accepted):
P, Q, R =map(int, input().split())
if P+Q <= P+R and P+Q <= Q+R:
    print(P+Q)
elif P+R <= P+Q and P+R <= Q+R:
    print(P+R)
else:
    print(Q+R)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P, Q, R = map(int, input().split())
X = [P, Q, R]
X.pop()
print(sum(X))

Failing test case input:
3 -1 -2

Expected output:
-3


Actual output:
2


Fixed submission (verdict: Accepted):
P, Q, R = map(int, input().split())
X = [P, Q, R]
X.sort()
X.pop()
print(sum(X))

Problem: p03011
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a_L = list(map(int,input().split()))
sorted(a_L)
print(a_L[0]+a_L[1])

Failing test case input:
101 -44 -7

Expected output:
-51


Actual output:
57


Fixed submission (verdict: Accepted):
a_L = list(map(int,input().split()))
a_L = sorted(a_L)
print(a_L[0]+a_L[1])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p,q,r = map(int, input().split())

print(max(p+q,q+r,r+p))


Failing test case input:
1 1 -14

Expected output:
-13


Actual output:
2


Fixed submission (verdict: Accepted):
p,q,r = map(int, input().split())

print(min(p+q,q+r,r+p))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import copy

params = [1, 3, 4]
count = len(params)-1

minTime = 100

for i in range(count):
  pattern = copy.copy(params)
  total = 0
  pattern.pop(i)

  print(params)
  for j in range(len(pattern)-1):
      total = params[i]+pattern[j]
      if total <= minTime:
          minTime = total

print(minTime)

Failing test case input:
3 1 0

Expected output:
1


Actual output:
[1, 3, 4]
[1, 3, 4]
4


Fixed submission (verdict: Accepted):
import copy

params = list(map(int, input().split()))
count = len(params)

minTime = 500

for i in range(count):
  pattern = copy.copy(params)
  total = 0
  pattern.pop(i)
  for j in range(len(pattern)):
      total = params[i]+pattern[j]
      if total <= minTime:
          minTime = total

print(minTime)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
F, S, T = map(int, input().split())
FS = F + S
ST = S + T
TF = T + F
L = [FS, ST, TF]
print(max(L))

Failing test case input:
-134 1 2

Expected output:
-133


Actual output:
3


Fixed submission (verdict: Accepted):
F, S, T = map(int, input().split())
FS = F + S
ST = S + T
TF = T + F
L = [FS, ST, TF]
print(min(L))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print(a+b+c-min(a,b,c))

Failing test case input:
-74 1 1

Expected output:
-73


Actual output:
2


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
print(a+b+c-max(a,b,c))
Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P, Q, R =map(int, input().split())
if P+Q < P+R and P+Q < Q+R:
    print(P+Q)
elif P+R < P+Q and P+R < Q+R:
    print(P+R)
else:
    print(Q+R)

Failing test case input:
-25 1 1

Expected output:
-24


Actual output:
2


Fixed submission (verdict: Accepted):
P, Q, R =map(int, input().split())
if P+Q <= P+R and P+Q <= Q+R:
    print(P+Q)
elif P+R <= P+Q and P+R <= Q+R:
    print(P+R)
else:
    print(Q+R)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l=list(map(int,input().split()))
l.sort()
print(l[1]+l[2])

Failing test case input:
011 -48 1

Expected output:
-47


Actual output:
12


Fixed submission (verdict: Accepted):
l=list(map(int,input().split()))
l.sort()
print(l[0]+l[1])

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print(sum(sorted(list(map(int,input().split()))[:1])))


Failing test case input:
101 -25 2

Expected output:
-23


Actual output:
101


Fixed submission (verdict: Accepted):
print(sum(sorted(list(map(int,input().split())))[:2]))

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = list(map(int,input().split()))
print(sum(a)-min(a))

Failing test case input:
011 -23 1

Expected output:
-22


Actual output:
12


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
print(sum(a)-max(a))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input().split()
sorted(a)
b = int(a[0]) + int(a[1])
print(b)

Failing test case input:
001 -12 -77

Expected output:
-89


Actual output:
-11


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
a.sort()
b = int(a[0]) + int(a[1])
print(b)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = [ int(i) for i in input().split() ]
print( a[0] + a[1] )

Failing test case input:
001 -10 -77

Expected output:
-87


Actual output:
-9


Fixed submission (verdict: Accepted):
a = [ int(i) for i in input().split() ]
a = sorted(a)
print( a[0] + a[1] )

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p,q,r=list(map(int,input().split()))
print(min(p+q,q+r))

Failing test case input:
7 20 2

Expected output:
9


Actual output:
22


Fixed submission (verdict: Accepted):
p,q,r=list(map(int,input().split()))
print(min(p+q,q+r,r+p))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
P, Q, R = map(int, input().split())
times = [P, Q, R]
from itertools import combinations

max = 0
for i in combinations(times, r=2):
  j = sum(i)
  if j > max:
    max = j

print(max)

Failing test case input:
101 -71 -7

Expected output:
-78


Actual output:
94


Fixed submission (verdict: Accepted):
P, Q, R = map(int, input().split())
times = [P, Q, R]
from itertools import combinations
 
min_ = 200
for i in combinations(times, r=2):
  j = sum(i)
  if j < min_:
    min_ = j
print(min_)
Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ab , bc , ca = map(int , input(). split())
print(min(ab , ca) + bc)

Failing test case input:
5 84 3

Expected output:
8


Actual output:
87


Fixed submission (verdict: Accepted):
ab , bc , ca = map(int , input(). split())
print(ab + bc + ca - max(ab , bc , ca))

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
list=list(map(int,input().split()))
print(sorted(list)[1]+sorted(list)[2])

Failing test case input:
46 24 0

Expected output:
24


Actual output:
70


Fixed submission (verdict: Accepted):
list=list(map(int,input().split()))
print(sorted(list)[0]+sorted(list)[1])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
PQR = list(map(int, input().split()))
PQR.sort
print(PQR)
print(PQR[0]+PQR[1])

Failing test case input:
111 -117 -5

Expected output:
-122


Actual output:
[111, -117, -5]
-6


Fixed submission (verdict: Accepted):
PQR = list(map(int, input().split()))
PQR.sort(reverse=False)
print(PQR[0]+PQR[1])

Problem: p03011
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A,B,C = map (int, input ().split ())
if A>B>C or A>C>B:
  print (B+C)
elif B>A>C or B>C>A:
  print (A+C)
else:
  print (A+B)

Failing test case input:
010 -10 -10

Expected output:
-20


Actual output:
0


Fixed submission (verdict: Accepted):
A,B,C = map (int, input ().split ())
if A>=B>=C or A>=C>=B:
  print (B+C)
elif B>=A>=C or B>=C>=A:
  print (A+C)
else:
  print (A+B)

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
y=input().split()
for i in range(len(y)):
    y[i]=int(y[i])
a=[]
a.append(y[0]+y[1])
a.append(y[2]+y[1])
a.append(y[0]+y[2])
a.sort()
print(a[1])

Failing test case input:
-60 0 2

Expected output:
-60


Actual output:
-58


Fixed submission (verdict: Accepted):
y=input().split()
for i in range(len(y)):
    y[i]=int(y[i])
a=[]
a.append(y[0]+y[1])
a.append(y[2]+y[1])
a.append(y[0]+y[2])
a.sort()
print(a[0])

Problem: p03011
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p,q,r = map(int,input().split())

min = p + q

if (min > q + r):
    min = q + r
elif (min > r + p):
    min = r + p

print (int(min))

Failing test case input:
5 84 3

Expected output:
8


Actual output:
87


Fixed submission (verdict: Accepted):
p,q,r = map(int,input().split())

min = p + q

if (min >= q + r):
    min = q + r
if (min >= r + p):
    min = r + p

print (int(min))

Problem: p03011
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = list(map(int, input().split()))

a = []

a.append(n[0] + n[1])
a.append(n[1]+n[2])
print(min(a))

Failing test case input:
11 24 2

Expected output:
13


Actual output:
26


Fixed submission (verdict: Accepted):
n = list(map(int, input().split()))

a = []

a.append(n[0] + n[1])
a.append(n[1]+n[2])
a.append(n[0]+n[2])
print(min(a))
Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=map(int,input().split())
print(int((n-1)/(k-1)))

Failing test case input:
8 3
14 5 1 4 4 6 2 5

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
print((n+k-3)

Problem: p03317
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,K = map(int, input().split())

if(N==K):
  print(1)
else:
  ans = int((N-1)/(K-1))+1
  print(ans)

Failing test case input:
7 3
0 4 0 4

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
N,K = map(int, input().split())

if(int((N-1)%(K-1))==0):
	ans = int((N-1)/(K-1))
else:
  	ans = int((N-1)/(K-1))+1
print(ans)

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))

print(math.ceil(N/(K-1)))

Failing test case input:
7 3
2 3 1 4

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))

print(math.ceil((N-1)/(K-1)))

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int, input().split())
input()

print(round((N-1)/(K-1)))

Failing test case input:
90 3
-2 2 2 1

Expected output:
45


Actual output:
44


Fixed submission (verdict: Accepted):
import math
N, K = map(int, input().split())
input()

print(math.ceil((N-1)/(K-1)))

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
Len, Split = map(int, input().split())
_res = Len % (Split-1)

if _res:
    res = int((Len / (Split - 1)) + 1)
    print(res)
else:
    res = int(Len / (Split - 1))
    print(res)

Failing test case input:
31 3
-4 3 1 6

Expected output:
15


Actual output:
16


Fixed submission (verdict: Accepted):
Len, Split = map(int, input().split())
_res = (Len - 1) % (Split - 1)
if _res:
    res = int(((Len - 1) 
    print(res)
else:
    res = int((Len - 1) 
    print(res)

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K=map(int,input().split())
A=list(map(int,input().split()))
flag=0

while N>0:
    N-=(K-1)
    flag+=1
print(flag)

Failing test case input:
26 2
6 1 2 1

Expected output:
25


Actual output:
26


Fixed submission (verdict: Accepted):
N,K=map(int,input().split())
A=list(map(int,input().split()))
flag=0

while N>0:
    N-=(K-1)
    flag+=1
    if N==1:
        break;
print(flag)

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K = map(int, input().split())
A=list(map(int,input().split()))

min_num=min(A)
count=K-1

print(int(-(-len(A)/count)))

Failing test case input:
44 3
-4 3 1 6

Expected output:
22


Actual output:
2


Fixed submission (verdict: Accepted):
N,K = map(int, input().split())
A=list(map(int,input().split()))

min_num=min(A)
count=A.count(min_num)
target=len(A)-count
K_num=K-1

print(int(-(-target
Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = [int(x) for x in input().split()] 
A = [int(x) for x in input().split()]






if N == K:
    print(1)
else:
    print(int((N - 1) / (K - 1)) + 1)

Failing test case input:
20 2
-6 1 -4 1

Expected output:
19


Actual output:
20


Fixed submission (verdict: Accepted):
N, K = [int(x) for x in input().split()]
input()
if (N - K) % (K - 1) == 0:
    print(int((N - K) / (K - 1)) + 1)
else:
    print(int((N - K) / (K - 1) + 2))

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n , k = map(int,input().split())
ans = (n-1)
print(ans)

Failing test case input:
20 3
-1 4 0 4

Expected output:
10


Actual output:
19


Fixed submission (verdict: Accepted):
n , k = map(int,input().split())
print((n-2)

Problem: p03317
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, K = map(int, input().split())
A = [int(x) for x in input().split()]

c = 0
while N > 0:
    c += 1
    N -= K-1
print(c)


Failing test case input:
31 4
-2 2 1 6

Expected output:
10


Actual output:
11


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
A = [int(x) for x in input().split()]

c = 0
while N > 1:
    c += 1
    N -= K-1
print(c)

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

s = input().rstrip().split()

n = int(s[0])
k = int(s[1]) - 1

a = input()

block = math.ceil(n / k)

if(n % k == 1):
    print(block - 1)
elif(n == k + 1):
    print(1)
else:
    print(block)

Failing test case input:
32 2
-1 4 0 1

Expected output:
31


Actual output:
32


Fixed submission (verdict: Accepted):
import math

s = input().rstrip().split()

n = int(s[0])
k = int(s[1]) - 1

a = input()

block = math.ceil(n / k)
if(k == 1):
  	print(n-1)

elif(n % k == 1):
    print(block - 1)
elif(n == k + 1):
    print(1)
else:
    print(block)

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
a = list(map(int, input().split()))

x = n
print(x)

Failing test case input:
31 3
-2 6 0 6

Expected output:
15


Actual output:
31


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
a = list(map(int, input().split()))

if (n-k)%(k-1) == 0:
  print((n-k)
else:
  print((n-k)

Problem: p03317
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
A = list(map(int, input().split()))

if N == K:
    print(1)
    exit()

q, r = divmod(N, K - 1)

if r == 0:
    print(q)
else:
    print(q + 1)

Failing test case input:
7 3
0 4 0 4

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
from math import ceil

N, K = map(int, input().split())
A = list(map(int, input().split()))

if N == K:
    print(1)
    exit()


print(ceil((N - K) / (K - 1)) + 1)
Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
str = input()
n, k = str.split(' ')
ni = int(n)
ki = int(k)
str = input()

if ni == ki:
    print(1)
elif ki == 2:
    print(ni-1)
elif ki == (int(ni/2)+1):
    print(2)
else:
    print(int((ni-1)/(ki-1))+1)

Failing test case input:
31 3
-4 2 1 5

Expected output:
15


Actual output:
16


Fixed submission (verdict: Accepted):
str = input()
n, k = str.split(' ')
ni = int(n)
ki = int(k)
str = input()

if ni == ki:
    print(1)
elif ki == 2:
    print(ni-1)
elif ((ni-1)%(ki-1) == 0):
    print(int((ni-1)/(ki-1)))
else:
    print(int((ni-1)/(ki-1))+1)

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K=map(int,input().split())
import math
A=list(map(int,input().split()))
ans=1
ans+=math.ceil(N-K)/(K-1)
print(ans)

Failing test case input:
4 3
2 3 2 4

Expected output:
2


Actual output:
1.5


Fixed submission (verdict: Accepted):
N,K=map(int,input().split())
import math
A=list(map(int,input().split()))
ans=1
ans+=math.ceil((N-K)/(K-1))
print(ans)

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import ceil
n,k=map(int,input().split())
print(ceil(n-1/k-1))

Failing test case input:
92 8
-2 7 0 6

Expected output:
13


Actual output:
91


Fixed submission (verdict: Accepted):
from math import ceil
n,k=map(int,input().split())
print(ceil((n-1)/(k-1)))

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k = map(int,input().split())
a = list(map(int,input().split()))
import math as m
if n<=k:
    print(1)
else:
    print(1+m.ceil((n-k)/2))

Failing test case input:
115 5
0 1 2 7

Expected output:
29


Actual output:
56


Fixed submission (verdict: Accepted):
n,k = map(int,input().split())
a = list(map(int,input().split()))
import math as m
if n==k:
    print(1)
else:
    print(1+m.ceil((n-k)/(k-1)))

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
str = input()
n, k = str.split(' ')
ni = int(n)
ki = int(k)
str = input()

if ni == ki:
    print(1)
elif ki == 2:
    print(ni-1)
else:
    print(int((ni-1)/(ki-1))+1)

Failing test case input:
7 3
0 4 1 3

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
str = input()
n, k = str.split(' ')
ni = int(n)
ki = int(k)
str = input()

if ni == ki:
    print(1)
elif ki == 2:
    print(ni-1)
elif ((ni-1)%(ki-1) == 0):
    print(int((ni-1)/(ki-1)))
else:
    print(int((ni-1)/(ki-1))+1)
Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N,K = list(map(int,input().split()))
A = list(map(int,input().split()))

min_idx = A.index(min(A))

count = N
for i in range(max(0,min_idx-K+1), min_idx+1):
    tmp = math.ceil(i/(K-1)) + math.ceil((N-(i+K))/(K-1))
    if count > tmp:
        count = tmp

print(tmp+1)

Failing test case input:
200 5
-1 2 -2 -1

Expected output:
50


Actual output:
51


Fixed submission (verdict: Accepted):
import math

N,K = list(map(int,input().split()))
A = list(map(int,input().split()))

min_idx = A.index(min(A))

count = N
start = max(0,min_idx-K+1)
end = min(start+K, N)
for i in range(start, end):
    tmp = math.ceil(i/(K-1)) + max(0, math.ceil((N-(i+K))/(K-1)))
    if count > tmp+1:
        count = tmp+1

print(count)

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n, k, *nums = map(int, open(0).read().split())
print(math.ceil((n-k)/2)+1)

Failing test case input:
200 4
0 0 -1 0

Expected output:
67


Actual output:
99


Fixed submission (verdict: Accepted):
import math
n, k, *nums = map(int, open(0).read().split())
print(math.ceil((n-k)/(k-1))+1)

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a, b = map(int, input().split())
c = b - 1

d = a / c

print(math.ceil(d))


Failing test case input:
7 3
0 4 1 3

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
import math
a, b = map(int, input().split())
d = (a-1) / (b-1)
print(math.ceil(d))

Problem: p03317
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
x = [map(int, input().split())]

for i in range(n):
	l=k*i-(i-1)
	if i==0:
		l=k
	if l>=n:
		print(i+1)
		break

Failing test case input:
4 3
2 3 1 4

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
x = list(map(int, input().split()))

for i in range(1,n+1):
	l=k*i-(i-1)
	if l>=n:
		print(i)
		break

Problem: p03317
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):


def solve():
    N, K = map(int, input().split())
    Ax = list(map(int, input().split()))
    if N == K:
        print(1)
        exit()

    N -= K
    ans = 1

    while N >= 0:
        N = N-(K-1)
        ans += 1

    print(ans)



if __name__ == "__main__":
    solve()


Failing test case input:
31 3
-4 2 1 6

Expected output:
15


Actual output:
16


Fixed submission (verdict: Accepted):


def solve():
    N, K = map(int, input().split())
    Ax = list(map(int, input().split()))
    if N == K:
        print(1)
        exit()

    N -= K
    ans = 1

    while N > 0:
        N = N-(K-1)
        ans += 1

    print(ans)



if __name__ == "__main__":
    solve()