ZhenlongDai/ACPR huggingface dataset:
Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int, input().split())
mod = 10 ** 9 + 7

def comb(n, k):
  if k > n - k:
    return comb(n, n - k)
  mul, div = 1, 1
  for i in range(k):
    mul = mul * (n - i) % mod
    div = div * (k - i) % mod
  return mul * pow(div, mod-2, mod) % mod

for i in range(1, K + 1):
  print(comb(N - K + 1, i) * comb(K - 1, i - 1) % mod)

Failing test case input:
14 15

Expected output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Actual output:
1
14
91
364
1001
2002
3003
3432
3003
2002
1001
364
91
14
1


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
mod = 10 ** 9 + 7

def comb(n, k):
  if n < k: 
    return 0
  if n < 0 or k < 0: 
    return 0
  if k > n - k:
    return comb(n, n - k)
  mul, div = 1, 1
  for i in range(k):
    mul = mul * (n - i) % mod
    div = div * (k - i) % mod
  return mul * pow(div, mod-2, mod) % mod

for i in range(1, K + 1):
  print(comb(N - K + 1, i) * comb(K - 1, i - 1) % mod)

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

def nCk(n, k):
    return math.factorial(n) / (math.factorial(k) * math.factorial(n - k))

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

try:
    for i in range(1, K + 1):
        print(int((nCk(N-K+1, i) * nCk(K-1, i-1)) % (10**9 + 7)))
except:
    exit

Failing test case input:
300 14

Expected output:
287
533533
304113810
170961317
691026191
660815354
274116797
594087832
812542003
660370852
942644542
731133909
693100307
219282874


Actual output:
287
533533
304113810
170961317
691026191
660815354
274116801
594087764
812543878
660468077
942670612
735491743
694483452
218046621


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

N, K = map(int, input().split())
mod = 10**9 + 7

def cmb(n, r):
    if n >= r:
        return int(factorial(n) 
    else:
        return 0

for i in range(1, K+1):
    print(cmb(N-K+1, i) * cmb(K-1, i-1) % mod)

Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k = map(int,input().split())
fact = [1]*10000
mod = 10**9+7
for i in range(1,10000):
    fact[i] = (fact[i-1]*i)%mod

def comb(n,k):
    x = fact[n]
    x *= pow(fact[k],mod-2,mod)
    x *= pow(fact[n-k],mod-2,mod)
    return x

for i in range(1,k+1):
    res = comb(n-k+1,i)*comb(k-1,i-1)
    print(res%mod)

Failing test case input:
14 15

Expected output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Actual output:
562931073
234316682
512702184
483697573
72498225
539917938
272821702
901035578
194889258
209237538
285590456
295849851
518236371
215676935
17856466


Fixed submission (verdict: Accepted):
u = 10**5
mod = 10**9+7
f = [1]*u
for i in range(1,u):
    f[i]*=f[i-1]*i
    f[i] %= mod

def comb(n,k):
    x = f[n]
    x *= pow(f[k],mod-2,mod)
    x %= mod
    x *= pow(f[n-k],mod-2,mod)
    x %= mod
    return x

n,k = map(int,input().split())
for i in range(1,k+1):
    res = 0
    if n-k+1 >= i:
        res = comb(n-k+1,i)*comb(k-1,i-1)
        res %= mod
    print(res)
Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K = map(int,input().split())
mod = 10**9+7
def combination(n,k):
    bunsi = 1
    bunbo = 1
    for j in range(k):
        bunsi = bunsi*(n-j)%mod
        bunbo = bunbo*(j+1)%mod
    return(bunsi*pow(bunbo,mod-2,mod)%mod)
for i in range(1,K+1):
    print(combination(K-1,i-1)*combination(N-K+1,i))

Failing test case input:
158 14

Expected output:
145
135720
38815920
52538885
203991368
567637400
838399634
962393592
987326772
793135564
75392742
593241535
408988767
692233614


Actual output:
145
135720
38815920
5052538920
356203993860
803567643021
1418838409560
1308962402748
357987329271
273793137475
96075393414
19593241668
10408988837
692233614


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
mod = 10**9+7
def combination(n,k):
    bunsi = 1
    bunbo = 1
    for j in range(k):
        bunsi = bunsi*(n-j)%mod
        bunbo = bunbo*(j+1)%mod
    return(bunsi*pow(bunbo,mod-2,mod)%mod)
for i in range(1,K+1):
    print(combination(K-1,i-1)*combination(N-K+1,i)%mod)

Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k = map(int,input().split()) 
p = n-k
mod = 10**9 + 7
def kai(n):
    p = 1
    for i in range(1,n+1):
        p = p*i % mod
    return p
def com(n,k):
    s = 0
    if n < k :
        return 0
    else:
        s = kai(n)*(pow(kai(k),mod-2,mod))*(pow(kai(n-k),mod-2,mod))
        return s%mod
for i in range(1,k+1):
    print(com(p+1,i)*com(k-1,i-1))

Failing test case input:
203 7

Expected output:
197
115836
18823350
217243293
239193290
61674091
256660747


Actual output:
197
115836
18823350
1217243300
5239193325
1061674098
256660747


Fixed submission (verdict: Accepted):
n,k = map(int,input().split()) 
p = n-k
mod = 10**9 + 7
def kai(n):
    p = 1
    for i in range(1,n+1):
        p = p*i % mod
    return p
def com(n,k):
    s = 0
    if n < k :
        return 0
    else:
        s = kai(n)*(pow(kai(k),mod-2,mod))*(pow(kai(n-k),mod-2,mod))
        return s%mod
for i in range(1,k+1):
    print(com(p+1,i)*com(k-1,i-1)%mod)

Problem: p02990
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
MOD = 10 ** 9 + 7
N, K = map(int, input().split())

def comb(n, k):
    ret = 1
    for i in range(1, k + 1):
        ret = ret * (n - i + 1) % MOD        
        ret = ret * pow(i, MOD - 2, MOD) % MOD
    return ret

for i in range(1, K + 1):
    n = i + 1
    k = N - K - i + 1
    ans = comb(n + k - 1, k) * comb(K - 1, i - 1) % MOD
    print(ans)



Failing test case input:
14 15

Expected output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Actual output:
1
14
91
364
1001
2002
3003
3432
3003
2002
1001
364
91
14
1


Fixed submission (verdict: Accepted):
MOD = 10 ** 9 + 7
N, K = map(int, input().split())

def comb(n, k):
    ret = 1
    for i in range(1, k + 1):
        ret = ret * (n - i + 1) % MOD        
        ret = ret * pow(i, MOD - 2, MOD) % MOD
    return ret

for i in range(1, K + 1):
    n = i - 1 + 2
    k = N - K - (i - 1)
    if k < 0:
        print(0)
    else:
        ans = comb(n + k - 1, k) * comb(K - 1, i - 1) % MOD
        print(ans)
Problem: p02990
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())


p=10**9+7

fuct=[1]
for i in range(2000):
  fuct.append((fuct[i]*(i+1))%p)

for i in range(1,min(k,n-k+1)+1):
  Ca=(fuct[k-1]*pow(fuct[i-1],-1,p)*pow(fuct[k-i],-1,p))%p
  Cb=(fuct[n-k+1]*pow(fuct[i],-1,p)*pow(fuct[n-k+1-i],-1,p))%p
  print((Ca*Cb)%p)

Failing test case input:
14 15

Expected output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Actual output:

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


p=10**9+7

fuct=[1]
for i in range(2000):
  fuct.append((fuct[i]*(i+1))%p)

for i in range(1,min(k,n-k+1)+1):
  Ca=(fuct[k-1]*pow(fuct[i-1],p-2,p)*pow(fuct[k-i],p-2,p))%p
  Cb=(fuct[n-k+1]*pow(fuct[i],p-2,p)*pow(fuct[n-k+1-i],p-2,p))%p
  print((Ca*Cb)%p)
for i in range(min(k,n-k+1)+1,k+1):
  print(0)

Problem: p02990
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from operator import mul
from functools import reduce

def cmb(n, r):
  if n < r:
    return 0
  r = min(n - r, r)
  if r == 0:
    return 1
  numer = reduce(mul, range(n, n - r, -1))
  denom = reduce(mul, range(1, r + 1))
  return numer 

N,K = map(int,input().split())
MOD = 10**9+7
for i in range(1, K+1):
  print(cmb(K-1,i-1) * cmb(N-K+1, i))


Failing test case input:
318 2

Expected output:
317
50086


Actual output:
317
100172


Fixed submission (verdict: Accepted):
from operator import mul
from functools import reduce

def cmb(n, r):
  if n < r:
    return 0
  r = min(n - r, r)
  if r == 0:
    return 1
  numer = reduce(mul, range(n, n - r, -1))
  denom = reduce(mul, range(1, r + 1))
  return (numer 

N,K = map(int,input().split())
MOD = 10**9+7
for i in range(1, K+1):
  print(cmb(K-1,i-1)%MOD * cmb(N-K+1, i)%MOD % MOD)

Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def nCr(n, r, mod):
    x, y = 1, 1
    for r_ in range(1, r+1):
        x = x*(n+1-r_)%mod
        y = y*r_%mod
    return x*pow(y, mod-2, mod)%mod

n, k = map(int, input().split())
for i in range(1, k+1): print(nCr(n-k+1, i, 10**9+7)*nCr(k-1, i-1, 10**9+7))

Failing test case input:
1407 9

Expected output:
1399
7823208
750525088
866507763
444580234
899312254
481568650
83698433
47562771


Actual output:
1399
7823208
12750525172
51866508120
28444580430
22899312408
10481568720
1083698440
47562771


Fixed submission (verdict: Accepted):
def nCr(n, r, mod):
    x, y = 1, 1
    for r_ in range(1, r+1):
        x = x*(n+1-r_)%mod
        y = y*r_%mod
    return x*pow(y, mod-2, mod)%mod

n, k = map(int, input().split())
mod = 10**9+7
for i in range(1, k+1): print(nCr(n-k+1, i, mod)*nCr(k-1, i-1, mod)%mod)
Problem: p02990
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k=map(int, input().split())
mod=10**9+7
def conbi(n,r,mod):
    ue=1
    for i in range(n-r+1,n+1):
        ue*=i
        ue%=mod
 
    sita=1
 
    for i in range(1,r+1):
        sita*=i
        sita%=mod
 
    sita=pow(sita,mod-2,mod)
 
    return (ue*sita)%mod
for i in range(1,k+1):
    ans=conbi(n-k+1,i,mod)*i**(k-i)
    print(ans%mod)

Failing test case input:
288 5

Expected output:
284
160744
22664904
61472997
860621958


Actual output:
284
321488
33997356
61472997
860621958


Fixed submission (verdict: Accepted):
n,k=map(int, input().split())
mod=10**9+7
def conbi(n,r,mod):
    ue=1
    for i in range(n-r+1,n+1):
        ue*=i
        ue%=mod
 
    sita=1
 
    for i in range(1,r+1):
        sita*=i
        sita%=mod
 
    sita=pow(sita,mod-2,mod)
 
    return (ue*sita)%mod
for i in range(1,k+1):
    ans=conbi(n-k+1,i,mod)*conbi(k-1,i-1,mod)
    print(ans%mod)

Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = list(map(int, input().split()))
lim = 1E9 + 7
C = [[1], [1,1]]

for i in range(2, n+10):
    C.append([1] + [(C[i-1][j-1] + C[i-1][j])%lim for j in range(1, i)] + [1])

for i in range(1, k+1):
    if n-k+1 < i  or k < i:
        print(0)
    else:
        print((C[n-k+1][i]*C[k-1][i-1])%lim)

Failing test case input:
195 3

Expected output:
193
37056
1179616


Actual output:
193.0
37056.0
1179616.0


Fixed submission (verdict: Accepted):
n, k = list(map(int, input().split()))
lim = 10**9 + 7
C = [[1], [1,1]]

for i in range(2, n+10):
    C.append([1] + [(C[i-1][j-1] + C[i-1][j])%lim for j in range(1, i)] + [1])

for i in range(1, k+1):
    if n-k+1 < i  or k < i:
        
        print(0)
    else:
        
        print((C[n-k+1][i]*C[k-1][i-1])%lim)

Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=map(int,input().split())
r1=1
import math
mod=10**9+7
dif=n-k
for i in range(k):
  r1*=(k-1-i)*(dif+1-i)*pow((i+1)**2, mod-2, mod)%mod
  print(r1)

Failing test case input:
677 4

Expected output:
674
680403
152410272
522274320


Actual output:
2022
1011000687480
674000538526054540080
0


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
r1=1
t=1
import math
mod=10**9+7
dif=n-k
for i in range(k):
  if i==0:r1=dif+1
  else:
    r1=r1*(k-i)*(dif+1-i)*pow((i*i+i), mod-2, mod)%mod
  print(r1)
Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
M = 10 ** 9 + 7
N, K = map(int, input().split())


def combmod(n, k):
    if k > n - k:
        k = n - k
    num, den = 1, 1
    for i in range(k):
        num = num * (n - i) % M
        den = den * (i + 1) % M
    inv_dev = pow(den, M - 2, M)
    return num * inv_dev % M


for i in range(1, K + 1):
    print(combmod(K - 1, i - 1) * combmod(N - K + 1, i) % M)


Failing test case input:
14 15

Expected output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Actual output:
1
14
91
364
1001
2002
3003
3432
3003
2002
1001
364
91
14
1


Fixed submission (verdict: Accepted):
M = 10 ** 9 + 7
N, K = map(int, input().split())


def combmod(n, k):
    if k > n - k:
        k = n - k
    num, den = 1, 1
    for i in range(k):
        num = num * (n - i) % M
        den = den * (i + 1) % M
    inv_dev = pow(den, M - 2, M)
    return num * inv_dev % M


for i in range(1, K + 1):
    if i <= N - K + 1:
        print(combmod(K - 1, i - 1) * combmod(N - K + 1, i) % M)
    else:
        print(0)

Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K=map(int,input().split())
MOD=10**9+7

def calculate_combination(n,k):
    x,y=1,1
    for i in range(k):
        x=x*(n-i)%MOD
        y=y*(k-i)%MOD
    return x*pow(y,MOD-2,MOD)%MOD

for i in range(1,K+1):
    a=calculate_combination(N-K+1,i)
    b=calculate_combination(K-1,i-1)
    print(a*b)

Failing test case input:
300 7

Expected output:
294
258426
62883660
99714978
337601515
171122478
887696990


Actual output:
294
258426
62883660
6099715020
10337601585
171122478
887696990


Fixed submission (verdict: Accepted):
N,K=map(int,input().split())
MOD=10**9+7

def calculate_combination(n,k):
    x,y=1,1
    for i in range(k):
        x=x*(n-i)%MOD
        y=y*(k-i)%MOD
    return x*pow(y,MOD-2,MOD)%MOD

for i in range(1,K+1):
    a=calculate_combination(N-K+1,i)
    b=calculate_combination(K-1,i-1)
    print(a*b%MOD)

Problem: p02990
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, K = map(int, input().split())
mod = 10**9+7

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n-i) * modinv(i+1, mod) % mod
    return res

for i in range(1, K+1):
    print((combination(N-K+1, i) * combination(K-1, i-1)) % mod)

Failing test case input:
14 15

Expected output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Actual output:
1
14
91
364
1001
2002
3003
3432
3003
2002
1001
364
91
14
1


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
mod = 10**9+7

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n-i) * modinv(i+1, mod) % mod
    return res

for i in range(1, K+1):
    if N-K+1 < i:
        print(0)
    else:
        print((combination(N-K+1, i) * combination(K-1, i-1)) % mod)
Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K = map(int,input().split())
mod = pow(10,9)+7

F = [1]
for i in range(N):F.append((F[i]*(i+1))%mod)
Y = [1]
for i in range(N):Y.append(pow(F[i+1],mod-2,mod))
def c(n,r):
    global F,Y
    if n<r:return 1
    return (F[n]*Y[n-r]*Y[r])%mod
for k in range(1,K+1):
    ans = c(N-K+1,k)*c(K-1,k-1)
    print(ans%mod)

Failing test case input:
14 15

Expected output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Actual output:
1
14
91
364
1001
2002
3003
3432
3003
2002
1001
364
91
14
1


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
mod = pow(10,9)+7

F = [1]
for i in range(N):F.append((F[i]*(i+1))%mod)
Y = [1]
for i in range(N):Y.append(pow(F[i+1],mod-2,mod))
def c(n,r):
    global F,Y
    if n<r:return 0
    return (F[n]*Y[n-r]*Y[r])%mod
for k in range(1,K+1):
    ans = c(N-K+1,k)*c(K-1,k-1)
    print(ans%mod)

Problem: p02990
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int, input().split())
mod = 10**9 + 7

def com(n, r):
    p, q = 1, 1
    for i in range(r):
        p *= (n-i)%mod
        q *= (r-i)%mod
    return p*pow(q, mod-2, mod)%mod

R = N-K
for k in range(1, K+1):
    print(com(R+1, k)*com(K-1, k-1))

Failing test case input:
1407 6

Expected output:
1402
4910505
583137972
952504286
760098256
861908546


Actual output:
1402
4910505
4583138000
2952504300
2760098270
861908546


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
mod = 10**9 + 7

def com(n, r):
    p, q = 1, 1
    for i in range(r):
        p = p*(n-i)%mod
        q = q*(r-i)%mod
    return p*pow(q, mod-2, mod)%mod

for k in range(1, K+1):
    print(com(N-K+1, k)*com(K-1, k-1)%mod)

Problem: p02990
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, K = map(int, input().split())
mod = 10**9+7

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n-i) * modinv(i+1, mod) % mod
    return res % mod

for i in range(1, K+1):
    print((combination(N-K+1, i) * combination(K-1, i-1)) % mod)

Failing test case input:
14 15

Expected output:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0


Actual output:
1
14
91
364
1001
2002
3003
3432
3003
2002
1001
364
91
14
1


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
mod = 10**9+7

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n-i) * modinv(i+1, mod) % mod
    return res

for i in range(1, K+1):
    if N-K+1 < i:
        print(0)
    else:
        print((combination(N-K+1, i) * combination(K-1, i-1)) % mod)
Problem: p02990
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,k=map(int,input().split())
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)




def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

for i in range(1,k+1):
    ans=(combination(n-k+1, i, mod=10**9+7))*(combination(k-1, i-1, mod=10**9+7))
    print(ans)

Failing test case input:
156 14

Expected output:
143
131989
37220898
776681882
979390428
946763442
563160127
573722096
454373538
49225204
201707350
605122050
16294718
297353372


Actual output:
143
131989
37220898
4776681910
331979392745
873946769553
7563160176
128573722992
159454374651
43049225505
26201707532
605122050
9016294781
297353372


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)




def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

for i in range(1,k+1):
    if n-k+1>=i:
        ans=(combination(n-k+1, i, mod=10**9+7))*(combination(k-1, i-1, mod=10**9+7))
    else:
        ans=0
    print(ans%(10**9+7))
Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
print(1 + S.count("+") - S.count("-"))


Failing test case input:
-+++

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
S = input()
print(S.count("+") - S.count("-"))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

print(s.count("+") + s.count("-"))

Failing test case input:
-++-

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):
s = input()

print(s.count("+") - s.count("-"))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()

b=(a.count('+'))
print (b)

n=-4+b*2

print (n)

Failing test case input:
-++-

Expected output:
0


Actual output:
2
0


Fixed submission (verdict: Accepted):
a=input()

b=(a.count('+'))

n=-4+b*2

print (n)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(4-input().count("-"))

Failing test case input:
+-++

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
print(4-input().count("-")*2)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input().split()
a=s.count('+')
print(2*a-4)

Failing test case input:
-++-

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
s=input()
a=s.count('+')
print(2*a-4)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input().split())
result = 0
for i in s:
    if i == '+':
        result += 1
    else:
        result -= 1
print(result)

Failing test case input:
++++

Expected output:
4


Actual output:
-1


Fixed submission (verdict: Accepted):
s = list(input())
result = 0
for i in s:
    if i == '+':
        result += 1
    else:
        result -= 1
print(result)

Problem: p03315
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
result = 0
for c in input().split():
  if c == '+':
    result += 1
  else:
    result -= 1

print(result)


Failing test case input:
-+-+

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
result = 0
for c in input():
  if c == '-':
    result -= 1
  else:
    result += 1
print(result)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input().split()

n = 0
for symbol in s:
    if symbol == '+':
        n += 1
    else:
        n -= 1
print(n)

Failing test case input:
-+-+

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
s = input()

n = 0
for symbol in s:
    if symbol == '+':
        n += 1
    else:
        n -= 1
print(n)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
 
m= S.count('-')
p = S.count('+')

print(abs(int(m)-int(p)))

Failing test case input:
----

Expected output:
-4

Actual output:
4


Fixed submission (verdict: Accepted):
S = list(input())
print(int(S.count('+'))-int(S.count('-')))
Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
ans = 0
for i in range(4):
    if S[0] == '+':
        ans += 1
    else:
        ans -= 1

print(ans)


Failing test case input:
+--+

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):
S = list(input())
ans = 0
for i in range(4):
    if S[i] == '+':
        ans += 1
    else:
        ans -= 1

print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
ans = 0
for i in range(4):
    if s[i] == '+':
        ans += 1
    elif s[i] == '-':
        ans -= 1

Failing test case input:
----

Expected output:
-4

Actual output:

Fixed submission (verdict: Accepted):
s = input()
ans = 0
for i in range(4):
    if s[i] == '+':
        ans += 1
    elif s[i] == '-':
        ans -= 1

print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())

count = 1
for i in range(4):
  if S[i]=='+':
    count+=1

print(2*count-4)

Failing test case input:
++++

Expected output:
4


Actual output:
6


Fixed submission (verdict: Accepted):
S = list(input())

count = 0
for i in range(4):
  if S[i]=='+':
    count+=1

print(2*count-4)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()
b=list(a)
c=0
for i in b:
  if b=='+':
    c+=1
  else:
    c+=-1
print(c)

Failing test case input:
-+++

Expected output:
2


Actual output:
-4


Fixed submission (verdict: Accepted):
a=input()
b=list(a)
c=0
for i in b:
  if i=='+':
    c+=1
  else:
    c+=(-1)
print(c)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
ans = 0
for i in S:
    if i == '+':
        ans += 1
    else:
        ans -= 1 

Failing test case input:
+--+

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
S = list(input())
ans = 0

for i in S:
    if i == '+':
        ans += 1
    else:
        ans -= 1 
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
li = list(input())

ans = 0

print (li)

for i in range(4) :
	if li[i] == '+' : 
		ans += 1
	else:
		ans -= 1

print(ans)

Failing test case input:
-+--

Expected output:
-2

Actual output:
['-', '+', '-', '-']
-2


Fixed submission (verdict: Accepted):
li = list(input())

ans = 0

for i in range(4) :
	if li[i] == '+' : 
		ans += 1
	else:
		ans -= 1

print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input())

p=s.count('+')
m=s.count('-')
n=p-m
if(p>m):print(n)
else:print(-n)

Failing test case input:
--+-

Expected output:
-2


Actual output:
2


Fixed submission (verdict: Accepted):
s=list(input())
p=s.count('+')
m=s.count('-')
n=p-m
print(n)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ans = 1
S = list(input())
for s in S:
  if s == '+':
    ans += 1
  else:
    ans -= 1
print(ans)

Failing test case input:
+-+-

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
ans = 0
S = list(input())
for s in S:
  if s == '+':
    ans += 1
  else:
    ans -= 1
print(ans)
Problem: p03315
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
op = input()
count = 0
for i in op:
  if(i == "-"):
    count-=1
  elif(i == "+"):
    count +=1

Failing test case input:
-++-

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
op = input()
count = 0
for i in op:
  if(i == "-"):
    count-=1
  elif(i == "+"):
    count +=1
print(count)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input().split()
ans = 0
for str in S:
    if str == '+':
        ans = ans +1
    else:
        ans = ans - 1
print(ans)


Failing test case input:
+--+

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
S = list(input())
ans = 0
for str in S:
    if str == '+':
        ans = ans +1
    else:
        ans = ans - 1
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
count = 0
for i in range(len(N)):
      if N[i] == "+":
            count = count +1
      if N[i] == "-":
            count = count - 1

Failing test case input:
----

Expected output:
-4

Actual output:

Fixed submission (verdict: Accepted):
N = input()
count = 0
for i in range(len(N)):
      if N[i] == "+":
            count = count +1
      if N[i] == "-":
            count = count - 1
print(count)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
out = 0
for i in range(4):
  if i == "+":
    out = out + 1
  else:
    out = out - 1
print(out)

Failing test case input:
+-+-

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
S = input()
out = 0
for i in S:
  if i == "+":
    out = out + 1
  else:
    out = out - 1
print(out)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
S = list(S)


S = [int(1) if '+' else int(-1) for x in S]

print(sum(S))

Failing test case input:
+-++

Expected output:
2

Actual output:
4


Fixed submission (verdict: Accepted):
S = input()
S = list(S)


S = [int(1) if x == '+' else int(-1) for x in S]

print(sum(S))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
c = 0
for i in range(len(S)):
  if S[0] == "+":
    c += 1
  else:
    c -= 1
print(c)

Failing test case input:
-+--

Expected output:
-2

Actual output:
-4


Fixed submission (verdict: Accepted):
S = input()
c = 0
for i in range(4):
  if S[i]=="+":
    c += 1
  else:
    c -= 1
print(c)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input().split()
print(a.count("+") - a.count("-"))


Failing test case input:
+-++

Expected output:
2

Actual output:
0


Fixed submission (verdict: Accepted):
a = [i for i in input()]
print(a.count("+") - a.count("-"))

Problem: p03315
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = list(input())

count = int(s.count("+")) - int(s.count("-"))

print(1 + count)

Failing test case input:
---+

Expected output:
-2


Actual output:
-1


Fixed submission (verdict: Accepted):
s = list(input())

count = int(s.count("+")) - int(s.count("-"))

print(count)
Problem: p03315
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = str(input())
a = 1 + s.count("+")-s.count("-")
print(a)

Failing test case input:
++--

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
s = str(input())
a = s.count("+")-s.count("-")
print(a)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input().split()
ans=0
for s in S:
    if s == '+':
        ans += 1
    else:
        ans -= 1
print(ans)

Failing test case input:
++--

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
S=list(input())
ans=0
for s in S:
    if s == '+':
        ans += 1
    else:
        ans -= 1
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=input().split()
print(n.count("+")-n.count("-"))

Failing test case input:
-+++

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
n=input()
print(n.count("+")-n.count("-"))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
ans = 0
for i in s:
  if i == '+':
    ans+= 1
  else:
    ans-= 1

Failing test case input:
+-+-

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
s = list(input())
ans = 0
for i in s:
  if i == '+':
    ans+= 1
  else:
    ans-= 1
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
ans=0
for i in range(4):
  if i=="+":
    ans+=1
  else:
    ans-=1
print(ans)

Failing test case input:
++-+

Expected output:
2


Actual output:
-4


Fixed submission (verdict: Accepted):
s=input()
ans=0
for i in s:
  if i=="+":
    ans+=1
  else:
    ans-=1
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
if S =="++++":
    print(4)
elif S =="----":
    print(-4)
elif S=="+++-" or S=="++-+" or S=="+-++" or S=="-+++":
    print(1)
elif S=="---+" or S=="-+--" or S=="--+-" or S=="+---":
    print(-1)
else:
    print(0)

Failing test case input:
++-+

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
S = input()
if S =="++++":
    print(4)
elif S =="----":
    print(-4)
elif S=="+++-" or S=="++-+" or S=="+-++" or S=="-+++":
    print(2)
elif S=="---+" or S=="-+--" or S=="--+-" or S=="+---":
    print(-2)
else:
    print(0)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
num = 0
if s[0] == "+":
  num += 1
else:
  num -= 1

if s[1] == "+":
  num += 1
else:
  num -= 1

if s[2] == "+":
  num += 1
else:
  num -= 1

if s[3] == "+":
  num += 1
else:
  num -= 1


Failing test case input:
--+-

Expected output:
-2


Actual output:

Fixed submission (verdict: Accepted):
s = input()
num = 0
if s[0] == "+":
  num += 1
else:
  num -= 1

if s[1] == "+":
  num += 1
else:
  num -= 1

if s[2] == "+":
  num += 1
else:
  num -= 1

if s[3] == "+":
  num += 1
else:
  num -= 1

print(num)
Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = 0
S = ['+','+','-','+']

for b in range(4):
    if S[b] == '+':
        a+=1
    elif S[b] == '-':
        a-=1
print(a)


Failing test case input:
+--+

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
a = 0
S = list(input())

for b in range(4):
    if S[b] == '+':
        a+=1
    elif S[b] == '-':
        a-=1
print(a)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
 
cnt=0
 
for i in range(4):
	if s[i]=='+':
		cnt+=1
 
res=2*i-4
 
print(res)

Failing test case input:
--+-

Expected output:
-2


Actual output:
2


Fixed submission (verdict: Accepted):
s=input()
 
cnt=0
 
for i in range(4):
	if s[i]=='+':
		cnt+=1

res=cnt*2-4
 
print(res)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
a=0
for i in s:
    if i=="+":
        a+=1
    else:
        a-=1
print(s)

Failing test case input:
--+-

Expected output:
-2


Actual output:
--+-


Fixed submission (verdict: Accepted):
s=input()
a=0
for i in s:
    if i=="+":
        a+=1
    else:
        a-=1
print(a)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
 
n = 0
 
S = sys.argv
 
for i in range(len(S)):
    if S[i]=="+": n+=1
    else: n-=1
 
print(n)


Failing test case input:
+++-

Expected output:
2


Actual output:
-1


Fixed submission (verdict: Accepted):
import sys
 
n = 0
 
S = input()

for i in range(0,4):
    if S[i]=="+": n+=1
    else: n-=1
 
print(n)

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


from sys import stdin
input = stdin.readline

S = input()
n = 0

for i in S:
    if i == '+':
        n += 1
    else:
        n -= 1

print(n)

Failing test case input:
----

Expected output:
-4

Actual output:
-5


Fixed submission (verdict: Accepted):



S = input()
n = 0

for i in S:
    if i == '+':
        n += 1
    else:
        n -= 1

print(n)

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

a=input()
print(a.count("+")+a.count("-"))


Failing test case input:
+-++

Expected output:
2

Actual output:
4


Fixed submission (verdict: Accepted):
import math

a=input()
print(a.count("+")-a.count("-"))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input().split()
num = 0
for i in s:
  if i == '+':
    num += 1
  else:
    num -= 1
    
print(num)

Failing test case input:
++--

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
s = list(input())
num = 0
for i in s:
	if i == '+':
		num += 1
	else:
		num -= 1
print(num)
Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import io


def solve(n):
    QUE=n
    EatSM=0
    Sum=QUE.count("+")
    Minus=QUE.count("-")
    print(EatSM+Sum-Minus)
    return EatSM+Sum-Minus


def readQuestion():
    line = sys.stdin.readline().rstrip()
    return line

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Failing test case input:
-+--

Expected output:
-2

Actual output:
-2
-2


Fixed submission (verdict: Accepted):
import sys
import io


def solve(n):
    QUE=n
    EatSM=0
    Sum=QUE.count("+")
    Minus=QUE.count("-")
    return EatSM+Sum-Minus

def readQuestion():
    line = sys.stdin.readline().rstrip()
    return line

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
print(S.count('1')-S.count('0'))


Failing test case input:
----

Expected output:
-4

Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
print(S.count('+')-S.count('-'))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(input())
sum=0
for i in range(len(a)):
  sum+=1 if a[i]=="+" else sum-1
print(sum)

Failing test case input:
--+-

Expected output:
-2


Actual output:
-5


Fixed submission (verdict: Accepted):
a=list(input())
sum=0
for i in range(len(a)):
  sum+=1 if a[i]=="+" else -1
print(sum)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
s = sys.stdin.readline()
ans = 0
for i in range(len(s)):
    if s[i] == '+':
        ans += 1
    else:
        ans -= 1
print(ans)

Failing test case input:
++++

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
s = input()
ans = 0
for i in range(len(s)):
    if s[i] == '+':
        ans += 1
    else:
        ans -= 1
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(input())
print(a)
n = 0
for i in a:
  if i == "+":
    n +=1
  else:
    n -=1
print(n)

Failing test case input:
++-+

Expected output:
2


Actual output:
['+', '+', '-', '+']
2


Fixed submission (verdict: Accepted):
a = list(input())
n = 0
for i in a:
  if i == "+":
    n +=1
  else:
    n -=1
print(n)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
a = S.count("+")
s = S.count("-")
print(4+a-s)

Failing test case input:
--+-

Expected output:
-2


Actual output:
2


Fixed submission (verdict: Accepted):
S = input()
a = S.count("+")
s = S.count("-")
print(a-s)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
num = 0

for pm in range(len(s)):
    num = num + 1 if pm == '+' else num - 1
print(num)

Failing test case input:
+-+-

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
s = input()
num = 0

for i in range(len(s)):
    num = num + 1 if  s[i] == '+' else num - 1

print(num)
Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(sum([1 if x=="+" else 0 for x in input()]))

Failing test case input:
--++

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
S=[1 if x=="+" else -1 for x in input()]

print(sum(S))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(map(str, input().split()))
ans = 0
for i in S :
  if i == "+" :
    ans += 1
  else :
    ans -= 1
print(ans)

Failing test case input:
---+

Expected output:
-2


Actual output:
-1


Fixed submission (verdict: Accepted):
S = list(str(input()))
ans = 0
for i in S :
  if i == "+" :
    ans += 1
  else :
    ans -= 1
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

plus = s.count('-')
minus = s.count('+')

print(plus - minus)

Failing test case input:
---+

Expected output:
-2


Actual output:
2


Fixed submission (verdict: Accepted):
s = input()

plus = s.count('+')
minus = s.count('-')

print(plus - minus)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
ans = 0
print(S)
for str in S:
    if str == '+':
        ans = ans +1
    else:
        ans = ans - 1
print(ans)


Failing test case input:
++-+

Expected output:
2


Actual output:
['+', '+', '-', '+']
2


Fixed submission (verdict: Accepted):
S = list(input())
ans = 0
for str in S:
    if str == '+':
        ans = ans +1
    else:
        ans = ans - 1
print(ans)

Problem: p03315
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S = input()
s = list(S)
print(s)
ans = 0

for a in s:
    if a == '+':
        ans += 1
    if a == '-':
        ans -= 1
print(ans)

Failing test case input:
-++-

Expected output:
0


Actual output:
['-', '+', '+', '-']
0


Fixed submission (verdict: Accepted):
S = input()
s = list(S)
ans = 0

for a in s:
    if a == '+':
        ans += 1
    if a == '-':
        ans -= 1
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()
b=list(a)
c=0
for i in b:
  if b=='+':
    c+=1
  else:
    c+=(-1)
print(c)

Failing test case input:
+---

Expected output:
-2


Actual output:
-4


Fixed submission (verdict: Accepted):
a=input()
b=list(a)
c=0
for i in b:
  if i=='+':
    c+=1
  else:
    c+=(-1)
print(c)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h = input()
h = list(h)
hoge = 0
for i in h:
    if h == '+':
        hoge += 1
    else:
        hoge -= 1

print(hoge)

Failing test case input:
++++

Expected output:
4


Actual output:
-4


Fixed submission (verdict: Accepted):
h = input()
h = list(h)
hoge = 0
for i in h:
    if i == '+':
        hoge += 1
    else:
        hoge -= 1

print(hoge)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input())
ans=0
for i in range(4):
    if s[i]=='+':
        ans+=1
    else:
        ans-=1

Failing test case input:
-+--

Expected output:
-2

Actual output:

Fixed submission (verdict: Accepted):
s=list(input())
ans=0
for i in range(4):
    if s[i]=='+':
        ans+=1
    else:
        ans-=1
print(ans)
Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=[input().split()]

print(a.count("+")-a.count("-"))

Failing test case input:
+-++

Expected output:
2

Actual output:
0


Fixed submission (verdict: Accepted):
l=input()

a=list(l)

print(a.count("+")-a.count("-"))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

sum = 0
for i in s:
    if s == "+":
        sum += 1
    else:
        sum -= 1

print(sum)

Failing test case input:
-+--

Expected output:
-2

Actual output:
-4


Fixed submission (verdict: Accepted):
s = input()

sum = 0
for i in s:
    if i == "+":
        sum += 1
    else:
        sum -= 1

print(sum)

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

def main():
    l = list(map(str, input().split()))
    count = 0
    for i in l:
        if i=='+':
            count = count + 1
        else:
            count = count - 1

    print(count)


if __name__ == '__main__' :
    main()

Failing test case input:
+-+-

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):

def main():
    l = list(input())
    count = 0
    for i in l:
        if i=='+':
            count = count + 1
        else:
            count = count - 1

    print(count)

if __name__ == '__main__' :
    main()

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input().rstrip()

num = 0

for c in s:
    if c == '+':
        num += 1
    if c == '+':
        num -= 1

print(num)


Failing test case input:
++++

Expected output:
4


Actual output:
0


Fixed submission (verdict: Accepted):
s = input().rstrip()

num = 0

for c in s:
    if c == '+':
        num += 1
    if c == '-':
        num -= 1

print(num)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
cs =list(input())
lp = len([c for c in cs if c=='+'])
lm = len([c for c in cs if c=='+'])
print(lp-lm)

Failing test case input:
++-+

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
cs =list(input())
lp = len([c for c in cs if c=='+'])
lm = len([c for c in cs if c=='-'])
print(lp-lm)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=list(input())
count=0
for s in S:
    if s=='+':
        count=+1
    if s=='-':
        count=-1


print(count)

Failing test case input:
++--

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
S=list(input())
count=0
for s in S:
    if s=='+':
        count=count+1
    if s=='-':
        count=count-1


print(count)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
ans=0
for i in range(4):
    if s[i]=="+":
        ans+=1
    else:
        ans-=1


Failing test case input:
++-+

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
s=input()
ans=0
for i in range(4):
    if s[i]=="+":
        ans+=1
    else:
        ans-=1
print(ans)
Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
from sys import stdin
s=Counter(list(stdin.readline().rstrip()))
print(s['+']+s['-'])

Failing test case input:
---+

Expected output:
-2


Actual output:
4


Fixed submission (verdict: Accepted):
from collections import Counter
from sys import stdin
s=Counter(list(stdin.readline().rstrip()))
print(s['+']*1+s['-']*-1)

Problem: p03315
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = input()
cnt = 0
for i in range(4):
  if s[i] == "+":
    cnt += 1
  elif s[i] == "-":
    cnt += 1
print(cnt)

Failing test case input:
-++-

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):
s = input()
cnt = 0
for i in range(4):
  if s[i] == "+":
    cnt += 1
  elif s[i] == "-":
    cnt -= 1
print(cnt)

Problem: p03315
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = list(input())

ans = 0
for i in s:
  if i == "+":
    ans += 1
  else:
    ans == 1
    
print(ans)

Failing test case input:
---+

Expected output:
-2


Actual output:
1


Fixed submission (verdict: Accepted):
s = list(input())

ans = 0
for i in s:
  if i == "+":
    ans += 1
  else:
    ans -= 1
    
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
print(s.count("+")-s.count("+"))

Failing test case input:
----

Expected output:
-4

Actual output:
0


Fixed submission (verdict: Accepted):
s = input()
print(s.count("+")-s.count("-"))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
print(s.count("+")^s.count("-"))

Failing test case input:
--+-

Expected output:
-2


Actual output:
2


Fixed submission (verdict: Accepted):
s = input()
print(s.count('+')-s.count('-'))

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = str(input())

x = 0

for i in range(3):
  if n[i] == "+":
    x = x + 1
  else:
    x = x - 1
    
print(x)



Failing test case input:
++++

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
n = str(input())

x = 0

for i in range(4):
  if n[i] == "+":
    x = x + 1
  else:
    x = x - 1
    
print(x)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
ans = 0
for i in range(4):
  if S[i] == '+':
    ans += 1
  else:
    ans =- 1
print(ans)

Failing test case input:
-++-

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
S=input()
ans = 0
for i in range(4):
  if S[i] == '+':
    ans += 1
  else:
    ans -= 1
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
print(abs(s.count('+')-s.count('-')))

Failing test case input:
--+-

Expected output:
-2


Actual output:
2


Fixed submission (verdict: Accepted):
s=input()
print(s.count('+')-s.count('-'))
Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
char = input()

answer = 0
for i in range(len(char)):
  if(char[i] == '+'):
    answer += 0
  elif(char[i] == '-'):
    answer -= 0
print(answer)

Failing test case input:
-+++

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
char = input()

answer = 0
for i in range(len(char)):
  if(char[i] == '+'):
    answer += 1
  elif(char[i] == '-'):
    answer -= 1
print(answer)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h = input()
h = list()
hoge = 0
for i in h:
    if h == '+':
        hoge += 1
    else:
        hoge -= 1

print(hoge)

Failing test case input:
---+

Expected output:
-2


Actual output:
0


Fixed submission (verdict: Accepted):
h = input()
h = list(h)
hoge = 0
for i in h:
    if i == '+':
        hoge += 1
    else:
        hoge -= 1

print(hoge)

Problem: p03315
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
op = input()
op = list(op)
count = 0
for i in op:
  if(i == "-"):
    count-=1
  elif(i == "+"):
    count +=1

Failing test case input:
--++

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
op = input()
count = 0
for i in op:
  if(i == "-"):
    count-=1
  elif(i == "+"):
    count +=1
print(count)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
x=0
for i in range(len(S)):
    if S[i] == '+':
        x +=1
    else:
        x -=0
print(x)

Failing test case input:
-+-+

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
S = input()
x=0
for i in range(len(S)):
    if S[i] == '+':
        x +=1
    else:
        x -=1
print(x)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
ans=0
for i in range(4):
    if S[i]=="+":
        ans+=1
print(ans)

Failing test case input:
----

Expected output:
-4

Actual output:
0


Fixed submission (verdict: Accepted):
S=input()
ans=0
for i in range(4):
    if S[i]=="+":
        ans+=1
    else:
        ans-=1
print(ans)

Problem: p03315
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
S = "---+"
i = 0
takahasi = 0
while i < 4:
  if S[i:i+1] == "+":
    takahasi += 1
  elif S[i:i+1] == "-":
    takahasi -= 1
  i += 1
print(takahasi)

Failing test case input:
+-++

Expected output:
2

Actual output:
-2


Fixed submission (verdict: Accepted):
from sys import stdin
S = str(stdin.readline().rstrip())
i = 0
takahasi = 0
while i < 4:
  if S[i:i+1] == "+":
    takahasi += 1
  elif S[i:i+1] == "-":
    takahasi -= 1
  i += 1
print(takahasi)