output_description
stringlengths
15
956
submission_id
stringlengths
10
10
status
stringclasses
3 values
problem_id
stringlengths
6
6
input_description
stringlengths
9
2.55k
attempt
stringlengths
1
13.7k
problem_description
stringlengths
7
5.24k
samples
stringlengths
2
2.72k
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s905177311
Runtime Error
p03315
Input is given from Standard Input in the following format: S
a=list(input()) count=1 for i in a: if i==-: count-=1 else: count+=1 print(count)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s613230836
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s=input() cnt=0 for i in range(4): if s[i]=='+': cnt=cnt+1 else: cnt=cnt-1 print(cnt)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s929558164
Runtime Error
p03315
Input is given from Standard Input in the following format: S
a = int(input()) b = sum(list(map(int, list(str(a))))) ans = a / b print("Yes" if ans == 0 else "No")
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s539368798
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() a = 0 for x in s: if x == '+' a += 1 else: a -= 1 print(a)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s682270092
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = map(str,input().split()) s =1 for i in S: if i in "+": s +=1 else: s -=1 print(s)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s040952163
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = str(input()) ans=0 for in range s: if '+' Then: ans += 1 else: ans -= 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s226576048
Accepted
p03315
Input is given from Standard Input in the following format: S
s = str(input()) slist = list(s) sum = 0 if 4 == len(slist): for i in range(len(slist)): if slist[i] == "+": sum += 1 elif slist[i] == "-": sum -= 1 else: print("hoge!") exit() print(sum) else: print("hoge!")
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s561209031
Runtime Error
p03315
Input is given from Standard Input in the following format: S
# coding: utf-8 inputN, inputK = map(int, input().split()) inputA = list(map(int, input().split())) minNumber = inputN minPos = 0 if inputN == inputK: print(1) elif inputN <= (inputK - 1) * 2 + 1: print(2) elif inputN <= (inputK - 1) * 3 + 1: print(3) elif inputN <= (inputK - 1) * 4 + 1: print(4) elif inputN <= (inputK - 1) * 5 + 1: print(5) else: for i in range(len(inputA)): if inputA[i] < minNumber: minNumber = inputA[i] minPos = i splitNumber = (inputN + 1) / (inputK - 1) print(int(splitNumber))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s178162884
Runtime Error
p03315
Input is given from Standard Input in the following format: S
n, k = map(int, input().split()) a = [int(i) for i in input().split()] chk = a.index(1) l = chk r = n - (chk + 1) t1 = l % (k - 1) t2 = r % (k - 1) print( min( l // (k - 1) + r // (k - 1), ((l - t2) // (k - 1)) + (r // (k - 1)), (l // (k - 1)) + ((r - t1) // (k - 1)), ) )
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s144238838
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S=list(input()) counter = 0 for i in range(len(S): if S[i] == '+': counter += 1 else: counter -= 1 print(counter)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s090132086
Runtime Error
p03315
Input is given from Standard Input in the following format: S
l=list(input()) n = 0 for i in range(len(l)): if l[i] == +: n += 1 if l[i] == -: n -= 1: print(n)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s204235049
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = int(input()) n = 0 if s[0] == + : n += 1 else: n -= 1 if s[1] == + : n += 1 else: n -= 1 if s[2] == + : n += 1 else: n -= 1 if s[3] == + : n += 1 else: n -= 1 print(n)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s550926997
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() output = 0 for o in s: if o == '+': output += 1 else if o == '-': output -= 1 else: pass print(output)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s686715340
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = map(int,input().split) a = 0 while a >= 4: if S = "+": a += 1 else: a -= 1 print(a)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s704867336
Runtime Error
p03315
Input is given from Standard Input in the following format: S
if __name__ == "__main__": s = str(input()) ans= 0 for c in s: if c == '-': ans = ans - 1 if c == '+' ans == ans + 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s341382387
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = list(input()) result = 0 for s in S: if s == ‘+’: result += 1 else: result -= 1 print(result)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s609725946
Runtime Error
p03315
Input is given from Standard Input in the following format: S
a = list(map(str,input().split())) num = 0 for i in range len a: if a[i] = "+": num +=1 else: num -=1 print(num)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s042548094
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = list(input()) ans = 0 for i in S: if i == '+': ans += 1 else: ans -= 1 S = list(input()) ans = 0 for i in S: if i == '+': ans += 1 else: ans -= 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s673511991
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = int(input()) n = 0 if s[0] = "+": n + 1 else: n - 1 if s[1] = "+": n + 1 else: n - 1 if s[2] = "+": n + 1 else: n - 1 if s[3] = "+": n + 1 else: n - 1
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s825428608
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S=input() if S.count('+') = 0: print(-4) elif S.count('+') = 1: print(-2) elif S.count('+') = 2: print(0) elif S.count('+') = 3: print(2) else: print(4)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s226199552
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() ans = 0 for i in range(len(s)): if s[i] == "+": ans += 1ac else: ans -= 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s314770875
Runtime Error
p03315
Input is given from Standard Input in the following format: S
a = list(map(input().split(''))) output = 0 for i in range(len(a)): if a[i] == '+': output += 1 elif a[i] == '-': output -= 1 } print(output)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s931594559
Runtime Error
p03315
Input is given from Standard Input in the following format: S
a,b,c,d = map(input().split()) if a='+' b='+' c='+' d='+': print('4') elif a='+' b='+' c='+' d='-': print('2') elif a='+' b='+' c='-' d='+': print('2') elif a='+' b='+' c='-' d='-': print('0') elif a='+' b='-' c='+' d='+': print('2') elif a='+' b='-' c='+' d='-': print('0') elif a='+' b='-' c='-' d='+': print('0') elif a='+' b='-' c='-' d='-': print('-2') elif a='-' b='+' c='+' d='+': print('2') elif a='-' b='+' c='+' d='-': print('0') elif a='-' b='+' c='-' d='+': print('0') elif a='-' b='+' c='-' d='-': print('-2') elif a='-' b='-' c='-' d='+': print('-2') elif a='-' b='-' c='+' d='-': print('-2') elif a='-' b='-' c='-' d='+': print('-2') else a='-' b='-' c='-' d='-': print('-4')
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s270418368
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = int(input()) n = 0 if s[0] == +: n + 1 else: n - 1 if s[1] == +: n + 1 else: n - 1 if s[2] == +: n + 1 else: n - 1 if s[3] == +: n + 1 else: n - 1 print(n)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s779195171
Runtime Error
p03315
Input is given from Standard Input in the following format: S
a,b,c,d = map(input().split()) if a='+' b='+' c='+' d='+': print('4') elif a='+' b='+' c='+' d='-': print('2') elif a='+' b='+' c='-' d='+': print('2') elif a='+' b='+' c='-' d='-': print('0') elif a='+' b='-' c='+' d='+': print('2') elif a='+' b='-' c='+' d='-': print('0') elif a='+' b='-' c='-' d='+': print('0') elif a='+' b='-' c='-' d='-': print('-2') elif a='-' b='+' c='+' d='+': print('2') elif a='-' b='+' c='+' d='-': print('0') elif a='-' b='+' c='-' d='+': print('0') elif a='-' b='+' c='-' d='-': print('-2') elif a='-' b='-' c='-' d='+': print('-2') elif a='-' b='-' c='+' d='-' print('-2') elif a='-' b='-' c='-' d='+' print('-2') else a='-' b='-' c='-' d='-' print('-4')
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s416290675
Runtime Error
p03315
Input is given from Standard Input in the following format: S
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0; i<n; i++) #define rep1(i,n) for(int i=1; i<n+1; i++) #define repr(i,n) for(int i=n-1; i>=0; i--) #define repr1(i,n) for(int i=n; i>0; i--) #define FOR(i,j,n) for(int i=j; i < n; i++) //vector<vector<int>> data(, vector<int>()); int main(){ string s; cin >> s ; int ans=0; rep(i,4){ if(s[i] == '+' ) ans++; if(s[i] == '-' ) ans--; } cout << ans <<endl; }
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s023925299
Accepted
p03315
Input is given from Standard Input in the following format: S
print(sum(44 - ord(c) for c in input()))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s248773907
Accepted
p03315
Input is given from Standard Input in the following format: S
print(eval(input().replace("", "1")) - 1)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s163871004
Accepted
p03315
Input is given from Standard Input in the following format: S
print((input().count("+") - 2) * 2)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s764495704
Accepted
p03315
Input is given from Standard Input in the following format: S
l = list(input()) print(l.count("+") - l.count("-"))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s748381484
Runtime Error
p03315
Input is given from Standard Input in the following format: S
----
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s674454144
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S=input() print(S.count("+")-S.count("-")
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s481460352
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S=print() print(-S.count('-'+S.count('+'))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s706528187
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = int(input()) print(s - 4 or s - 2 or s or s + 2 or s + 4)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s477495129
Wrong Answer
p03315
Input is given from Standard Input in the following format: S
s = input() ans = 0
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s196229881
Wrong Answer
p03315
Input is given from Standard Input in the following format: S
print(4 - 2 * input().count("c"))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s609217442
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() print(s.count('+')-s.count('-'))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s303004243
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = input() print(S.count(+) - S.count(-))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s733729958
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = list(input()) print(S.count("+")-S.count("-")
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s748036004
Runtime Error
p03315
Input is given from Standard Input in the following format: S
print(sum({"+": 1, "-": -1} for c in input()))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s967851732
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() print(+1 if + else -1 if -)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s401842142
Runtime Error
p03315
Input is given from Standard Input in the following format: S
print(4 - input().count() * 2)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s225305467
Runtime Error
p03315
Input is given from Standard Input in the following format: S
a=input() print(a.count(+)-a.count(-))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s138358204
Runtime Error
p03315
Input is given from Standard Input in the following format: S
in = input() plus = in.count("+") print(plus*2-4)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s089856682
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = input() print(S.count('+')-S.count'-')
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s854379920
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = [c for c in int()] print(2 * S.count("+") - 4)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s664160046
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = print() print(-S.count("-") + S.count("+"))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s782562539
Accepted
p03315
Input is given from Standard Input in the following format: S
print(eval("0" + input().translate(str.maketrans({"+": "+1", "-": "-1"}))))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s029895015
Accepted
p03315
Input is given from Standard Input in the following format: S
n = {"++++": 4, "+++-": 2, "++--": 0, "+---": -2, "----": -4} s = "".join(sorted(input())) print(n[s])
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s009900107
Runtime Error
p03315
Input is given from Standard Input in the following format: S
a=input() o=0 for i in range(len(a)): o+=1 if a[i]=='+' else o-=1 print(o)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s340885396
Runtime Error
p03315
Input is given from Standard Input in the following format: S
a=list(input()) o=0 for i in range(4): o+=1 if a[i]=='+' else o-=1 print(o)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s999707823
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() c = 0 for i in s: if i == +: c += 1 else: c -= 1 print(c)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s185034755
Runtime Error
p03315
Input is given from Standard Input in the following format: S
#coding:utf-8 s = input() a = 0 for c in s: a = a + 1 if c = "+" else a = a - 1 print(a)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s888293826
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = input() n = 0 for s in S: if S == "+" n += 1 else: n -= 1 print(n)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s326311738
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S=input() j=0 for i in range(4): if S[i]=="+": j=j+1 else j=j-1 print(j)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s897438547
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() ans = 0 for i in s: if i = "+": ans += 1 else: ans -= 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s013785184
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S=input() a=0 for i in S: if i==='+': a+=1 else: a-=1 print(a)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s252004415
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = input() n = 0 for s in S: if s == "+" n += 1 else: n -= 1 print(n)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s613286635
Runtime Error
p03315
Input is given from Standard Input in the following format: S
val = 0 for s in input(): if(s == '+'): val++ else: val-- print(val)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s203250557
Runtime Error
p03315
Input is given from Standard Input in the following format: S
n, c = map(int, input().split()) print((n - 1) // (c - 1))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s105848320
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s=input() num=0 for i in s: if i=="-": num-=1 else num+=1 print(num)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s958671721
Runtime Error
p03315
Input is given from Standard Input in the following format: S
D, N = map(int, input().split()) print(100**D * N if N < 100 else 100**D * 101)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s848604576
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s=str(input()) ans=-4 for i in range(4): if s[i]='+': ans+=2 input(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s765230082
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s=str(input()) ans=-4 for i in range(4): if s[i]='+': ans+=2 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s339792780
Runtime Error
p03315
Input is given from Standard Input in the following format: S
n, w = map(int, input().split()) print(int(n * (n - 1) / 2) + int(w * (w - 1) / 2))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s802688415
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() a = 0 for i in range(4): a += 1 if s[i:i+1] == '+' else a -= 1 print(a)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s859078553
Runtime Error
p03315
Input is given from Standard Input in the following format: S
c = 0 for s in input(): if s = '+':c += 1 else:c-= 1 print(c)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s019680980
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() ans = 0 for x in s: if x == '+': ans++ else: ans-- print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s409189699
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = input() A = 0 for s in S: if s == "-": A-- if s == "+": A++ print(A);
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s557030567
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() num = 0 for _ in range(len(s)): if s == '+': num += 1 else:
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s459917549
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() ans = 0 for i in range len(s): if(s[i] == '+'): ans += 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s445745267
Wrong Answer
p03315
Input is given from Standard Input in the following format: S
print(input().replace("Left", "<").replace("Right", ">").replace("AtCoder", "A"))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s119077868
Wrong Answer
p03315
Input is given from Standard Input in the following format: S
cs = list(input()) lp = len([c for c in cs if c == "+"]) lm = len([c for c in cs if c == "+"]) print(lp - lm)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s696534619
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s=input() p=0; m=0 for i in range(0,len(s)) if s[i]=='+': p += 1 else: m += 1 print(p-m)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s102257252
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() count = 0 for i in range(4): if s[i] == +: count += 1 else: count -=1 print(count)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s576608640
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s=input() a = 1 for i in range(0..3): if s[i] == +: a = a + 1 else: a = a - 1
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s703755225
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input().split() n = 0 for symbol in s: if symbol == '+': n += 1 else n -= 1 print(n)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s578256663
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = list(int(input())) cnt = 0 for i in s: if i = +: cnt = cnt +1 elif i = -: cnt = cnt-1 print(cnt)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s688697519
Runtime Error
p03315
Input is given from Standard Input in the following format: S
QUE=input("") EatSM=0 Sum=QUE.count("+") Minus=QUE.count("-") return EatSM+Sum-Minus
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s432999099
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = list(input()) cnt = 0 for i in S: if i == '+': cnt += 1 else: cnt -= 1 @rint(cnt)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s967053753
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = input() ans = 0 for c in S: if c == '+': ans += 1 else c == '-': ans -= 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s282528773
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() cnt = 0 for i in s: if i = '+': cnt = cnt +1 elif i = '-': cnt = cnt-1 print(cnt)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s486325273
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = input() ans = 0 for i in range(len(S)): if S[i] == "+": ans += 1 else: ans -= 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s408514339
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s=list(input()) count =0 for i in range(len(s)): if s[i]="+": count +=1 else: count -=1 print(count)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s789768216
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s = input() ans = 0 for i in range len(s): if(s[i] == '+'): ans += 1 else: ans -= 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s231358783
Runtime Error
p03315
Input is given from Standard Input in the following format: S
QUE=input("") EatSM=0 Sum=QUE.count("+") Minus=QUE.count("-") print(EatSM+Sum-Minus)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s265170135
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = str(input()) ans = 0 for i in range(len(S)): if S[i] == "+": ans += 1 else: ans -= 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s359088308
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S = input() ans = 0 for char in S: if char = "+": ans += 1 else: ans -= 1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s779521997
Runtime Error
p03315
Input is given from Standard Input in the following format: S
[a, b, c, d] = input() # 3文字の文字列 list = [a, b, c, d] k = 0 for f in list: if f = '+': k += 1 else: k -= 1 print(k)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s119874525
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S=list(input()) ans=0 if S[0]=='+': ans+=1 else : ans-=1 if S[1]=='+': ans+=1 else : ans-=1 if S[2]=='+': ans+=1 else : ans-=1 if S[3]=='+': ans+=1 else : ans-=1 print(ans)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s538573370
Runtime Error
p03315
Input is given from Standard Input in the following format: S
#include <bits/stdc++.h> #define FOR(i, m, n) for (int i = m; i < (n); i++) #define RFOR(i, m, n) for (int i = (m - 1); i >= 0; i--) #define REP(i, n) FOR(i, 0, n) #define RREP(i, n) RFOR(i, n, 0) #define ALL(v) v.begin(), v.end() #define RALL(v) v.rbegin(), v.rend() #define print(ele) cout << (ele) << endl #define print10(ele) cout << fixed << setprecision(10) << (ele) << endl using namespace std; typedef long long ll; typedef vector<int> ivec; typedef vector<string> svec; typedef vector<ll> lvec; const int mod = 1e9 + 7; const ll INF = 1000000000000000000LL; int main() { string s; cin >> s; int ans = 0; REP(i, 4) { if (s[i] == '+') ans++; else ans--; } print(ans); return 0; }
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s968510875
Accepted
p03315
Input is given from Standard Input in the following format: S
hoge = input() print(hoge.count("+") - hoge.count("-"))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s799025191
Accepted
p03315
Input is given from Standard Input in the following format: S
s = "0" + "1".join(list(input())) + "1" print(eval(s))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s216517624
Runtime Error
p03315
Input is given from Standard Input in the following format: S
print(input().count("+") - input().count("-"))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s279383418
Wrong Answer
p03315
Input is given from Standard Input in the following format: S
print(4 - input().count("-") * 1)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s592357739
Accepted
p03315
Input is given from Standard Input in the following format: S
print(sum(list(map(lambda x: 1 if x == "+" else -1, list(input())))))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s081065566
Runtime Error
p03315
Input is given from Standard Input in the following format: S
s=input() result=0 for i in s: result+=1 if i=="+" else result-=1 print(result)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s281046540
Runtime Error
p03315
Input is given from Standard Input in the following format: S
print(int(input().count("+")) + (-1 * int(input().count("-"))))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s321423555
Wrong Answer
p03315
Input is given from Standard Input in the following format: S
print(input().replace("Left", "<").replace("Right", ">").replace("Atcoder", "A"))
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]
Print the integer in Takahashi's mind after he eats all the symbols. * * *
s908412984
Runtime Error
p03315
Input is given from Standard Input in the following format: S
S=list(input()) a=0 for i in S: if i==='+': a+=1 else: a-=1 print(a)
Statement There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is `+` or `-`. When he eats `+`, the integer in his mind increases by 1; when he eats `-`, the integer in his mind decreases by 1. The symbols Takahashi is going to eat are given to you as a string S. The i-th character in S is the i-th symbol for him to eat. Find the integer in Takahashi's mind after he eats all the symbols.
[{"input": "+-++", "output": "2\n \n\n * Initially, the integer in Takahashi's mind is 0.\n * The first integer for him to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The second integer to eat is `-`. After eating it, the integer in his mind becomes 0.\n * The third integer to eat is `+`. After eating it, the integer in his mind becomes 1.\n * The fourth integer to eat is `+`. After eating it, the integer in his mind becomes 2.\n\nThus, the integer in Takahashi's mind after he eats all the symbols is 2.\n\n* * *"}, {"input": "-+--", "output": "-2\n \n\n* * *"}, {"input": "----", "output": "-4"}]