TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

n=input()
print(n*n*n)

import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

n=int(input())
print(n*n*n)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
s = list(input())
t = list(input())

count = 0

for i in range(3):
    if s[i] == t[i]:
        count = count + 1

print(count)

N = int(input())
pw = N**3
print(pw)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = input()
print(n*n*n)


n = int(input())
print(n*n*n)


Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
a = input()
print(a**3)

a = input()
b = a ** 3
print(int(b))

a = int(input())
print(a ** 3)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
a = input()
print(a ** 3)

n = input()
print(10 ** n)

print(input() ** 3)

a = int(input())
print(a ** 3)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N=int(input())
print N**3

N=int(input())
print (N**3)


Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N=input()
print(N**3)

N=input()
print(int(N)**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
print(N^^3)

N = int(input())
print(N**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input())
print(n^3)

n=int(input())
print(n**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())

print(n ** n)

n = int(input())

print(n ** 3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
prnt(int(input())**3)

print(int(input())**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
a = 2 ** N
print(a)


N = int(input())
a = N ** 3
print(a)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = input()
print(n**3)

n = int(input())
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
a_list = list(map(int, input().split()))
b_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))

score = 0

for val in b_list :
	score +=val
	
for val in range(n-1):
	if a_list[val+1] - a_list[val] == 1:
		score += c_list[a_list[val-1]]
	else:
		pass

print(score)

n = int(input())

m = n**3

print(m)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(print())
print(n*n*n)

n = int(input())
print (n*n*n)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = input()
print(pow(N,3))

N = input()
print(int(N*N*N))

input=()
print(N*N*N)

N = input()
print(str(N**3))

N = input()
print(N**3)

N =input()
print(int(N)**3)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(inupt())
print(n**3)

n = int(input())
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N=int(input())
print(N*N)

N=int(input())
print(N*N*N)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print(int(input()**3))

n = int(input())
print(n ** 3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input())
a=list(map(int, input().split()))
b=list(map(int, input().split()))
c=list(map(int, input().split()))
cnt=0
for i,v in enumerate(a):
	cnt += b[v-1]
	if i == 0:continue
	if v-1 == a[i-1]:
		#print(c[v-1])
		cnt += c[v-2]
print(cnt)

n=int(input())

print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
import math
t=input()
t=t.split()
a=int(t[0])
b=int(t[1])
x=(b-1)/(a-1)
x=math.ceil(x)
print(x)



n=input()
n=int(n)
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input)
print(n**3)

n = int(input())
print(n**3)


Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=input()

print(n*n*n)

n=int(input())

print(n*n*n)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N, K = [int(item) for item in input().split()]
S = [item for item in input()]

def compress(arr):
    
    cnt_h = 0
    new_arr = []
    comp_arr = ['L']

    
    if arr[0] == 'R':
        for item in arr:
            if item == 'L':
                new_arr.append('R')
            else:
                new_arr.append('L')

            prev_item = item
    else:
        new_arr = arr
    

    for i in range(1, N):
        if new_arr[i - 1] == new_arr[i]:
            cnt_h += 1
        else:
            comp_arr.append(new_arr[i])

    return [comp_arr, cnt_h] 


def execute(arr, cnt_h, K):
    
    max_rotation = len(arr)//2
    
    if max_rotation <= K:
        cnt += len(arr) - 1
    else:
        cnt_h += 2*K

    return cnt_h

arr, cnt_h = compress(S)
print(execute(arr, cnt_h, K))


print(int(input())**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
import sys

n=int(sys.stdin.readline())
print( n*3 )


import sys

n=int(sys.stdin.readline())
print( n**3 )


Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n,m = map(int,input().split())

s = input()

if len(s) == 2 and s[0] != s[-1]:
    print(0)
    exit()

if s == 'LRL' or s == 'RLR':
    print(0)
    exit()

if s[0] == 'L':
  count = s.count('LR')
else:
  count = s.count('RL')

count = count - m

if s[0] != s[-1]:
  print(n - 2 * max(count, 0) - 1 * (count <= 0))

else:
  if count > 0:
    print(n - 2 * count - 1)
  else:
    print(n - 2 - max(count, -1))

print(int(input())**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
result = 1
while n >= 1:
    result *= n
    n -= 1
print(result)

n = int(input())
print(n*n*n)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
a=input()
b=a*a*a
print(b)

a=input()
a=int(a)
b=a*a*a
print(b)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
b = list(map(int,input().split()))
ans = 0

for i in range(n-2):
    ans += min(b[i],b[i+1])  

if n == 2:
    print(min(b)*2)
else:
    print(ans+b[-1]+min(b))

n = int(input())
print(n*n*n)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(intput())
print(N ** 3)

N = int(intput())

print(N ** 3)

N = int(input())
a = N**3
print(a)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = input()

print(n*n*n)

n = int(input())
print(n*n*n)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))







cnt = 0


temp = ""


for x in A:
    
    
    cnt += B[x-1]
    
    
    if temp == x - 1:
        cnt += C[temp-1]
        
    
    temp = x

print(cnt)

N = int(input())

print(N**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(inpput())
print(N**3)

N = int(input())
print(N**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
print(n*3)

n = int(input())
print(n**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
pirnt(n**3)

n = int(input())
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = input()

print(N**3)

N = int(input())
print(N**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input())
print(2**n)

n=int(input())
print(n**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
import bisect

n = int(input())
P = list(map(int, input().split(" ")))
sp = sorted(P, reverse=True)
bi = []
bisect.insort(bi,P.index(sp[0]))
C = 0
lc = 0
rc = 0
C1 = 0
for j in sp[1:]:
  i = P.index(j)
  
  l = bisect.bisect_left(bi,i)
  if l == 0:
    lc = i + 1
    if len(bi) == 1:
      rc = n - bi[0]
    else:
      rc = bi[l+1] - bi[l]
    C1 = lc*rc
  elif l == len(bi):
    if len(bi) == 1:
      lc = bi[0] + 1
    else:
      lc = bi[l-1] - bi[l-2]
    rc = n - i
    C1 = lc*rc
  else: 
    if len(bi) == 2:
      lc = bi[0] + 1
      rc = bi[1] - i
      C1 = lc*rc
      lc = i - bi[0]
      rc = n - bi[1]
      C1 += lc*rc
    elif l == 1:
      lc = bi[0] + 1
      rc = bi[1] - i
      C1 = lc*rc
      lc = i - bi[0]
      rc = bi[2] - bi[1]
      C1 += lc*rc
    elif l == len(bi) - 1:
      lc = bi[l-1] - bi[l-2]
      rc = bi[l] - i
      C1 = lc*rc
      lc = i - bi[l-1]
      rc = n - bi[l]
      C1 += lc*rc
    else:
      lc = bi[l-1] - bi[l-2]
      rc = bi[l] - i
      C1 = lc*rc
      lc = i - bi[l-1]
      rc = bi[l+1] - bi[l]
      C1 += lc*rc
  C += (P[i]*C1)
  bisect.insort(bi,i)
  
print(C)

n = int(input())
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
count = 1
for i in range(N):
  if N = 0:
    print(count)
  else:
  	count *= N
  	N = N -1 

import sys
N = int(input())

if N == 1:
  print(1)
  sys.exit()
elif N == 2:
  print(2)
  sys.exit()
else:
  print(N*(N-1)*(N-2))
  sys.exit()

import  math
num = int(input())
print(math.factorial(num)) 

N = int(input())
print(N**3)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
b = list(map(int,input().split()))
a = [-1]*n
a[0] = b[0]
a[-1:] = b[-1:]
for i in range(n-2):
    a[i+1] = min(b[i],b[i+1])
print(sum(a))

n = int(input())
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N=input()
print(N**3)

N=int(input())
print(N**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
print(2**n)

n = int(input())
print(n**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=input()
print(n*n*n)

n=int(input())
print(n*n*n)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input())
m=n**n
print(m)

n=int(input())
m=n*n
print(m)

n=int(input())
m=n**3
print(m)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
B = list(map(int,input().split()))
A = []
A.append(B[0])
A.append(B[0])
for i in range(1, N - 2):
  if B[i] < A[i]:
    A[i] = B[i]
  A.append(B[i])

if N > 2:
  A.append(B[-1])
print(sum(A))

print(int(input()) ** 3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input())
answer=n**3


n=input()
print(n**3)

n=int(input())
print(n**3)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=input()
print(n**3)


n=int(input())
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
B = list(map(int, input().split()))
B_last = int(len(B))
A = B[0] + B[B_last - 1]
i = 1
old_b = B[1]
for i in range(N-1):
  #print("A =",A, "B =",B[i])
  b = B[i]
  if b >= old_b:
    A += old_b
    #print("A =",A)
  else:
    A += b
    #print(A)
  old_b = B[i]
  
#print("A =",A)
print(A)

N = int(input())
ans = pow(N, 3)
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
A = list(map(int,input().split(" ")))  
B = list(map(int,input().split(" "))) 
C = list(map(int,input().split(" ")) )


を足し合わせていく
manzoku = 0
for i in range(N):
    manzoku += B[A[i]-1]
    
    if i != 0 and (A[i] ==A[i-1] + 1):
        manzoku += C[A[i-1]-1]
        



print(manzoku)


N = int(input())

result = N*N*N 

print(result)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
print(n**3)

N = int(input())
print(N**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
print(n**3)


N = int(input())
print(N**3)


Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = input()
P = N**3
print(P)

print(input()**3)

print(int(input())**3)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input())
print(n**n)

n=int(input())
print(n**3)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input())
print(n**n)

n=int(input())
print(n**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print(int(input) ** 3)

print(int(input()) ** 3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
return (int(input()) ** 3)

print(int(input()) ** 3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N, K = list(map(int, input().split()))
S = input()
 
happy = 0
for i in range(N-1):
  if S[i] == S[i+1]:
    happy += 1
print(min([N-1, happy + 2 * K]))

print(int(input()) ** 3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
def main():
  n = int(input())
  pirnt(n**3)
  
main()

def main():
  n = int(input())
  print(n**3)
  
main()


Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N=int(input())
a=1
b=1
for i in range(1,N+1):
  a = a*(N+1-i)
  b = b*i
print(a//b)
  

N=int(input())
print(2**N)

N=int(input())
print(N**3)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
ls = [int(i) for i in input().split()]
if len(ls) == 1:
  print(ls[0]*2)
else:
  als = [ls[0]]
  for n in range(1, N-1):
    als.append(min(ls[n-1], ls[n]))
  als.append(ls[-1])
  print(sum(als))

n = int(input)
print(n*n*n)

n = int(input())
print(n*n*n)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input())
a_list = list(map(int,input().split()))
b_list = list(map(int,input().split()))
c_list = list(map(int,input().split()))
count = 0
for i in range(n):
    index=a_list[i]
    count += b_list[index - 1]
#     print(count)
    if i !=0:
        if a_list[i] == a_list[i-1] + 1:
            count += c_list[a_list[i-1]-1]
print(count)

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
 
answer = 0
 
for i in range(N):
  answer = answer + B[i]
  
for i in range(N):
  if i != 0:
    if A[i] == A[i-1]+1:
      answer = answer + C[a[i-1]-1]
    
print(answer)

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
 
answer = 0
 
for i in range(N):
  index = A[i]
  answer = answer + B[index-1]

  if i != 0:
    if A[i] == A[i-1]+1:
      answer = answer + C[A[i-1]-1]
      
print(answer)

N = int(input())
print(N*N*N)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
a=input()
b=a[0]
c=a[1]
d=a[2]
e=a[3]
print("SAME" if b==c==d==e else "DIFFERENT" )

n=int(input())
print(pow(n,3))

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
 
ans = sum(B)
for i in range(len(A)-1):
    if A[i] + 1 == A[i+1]:
        ans += C[A[i]-1]
 
print(ans)

n=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
d=sum(B)
for i in range(n-1):
  if A[i+1]-A[i]==1:
    d+=B[A[i]-1]
print(d)

n=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
d=sum(B)
for i in range(n-1):
  if A[i+1]-A[i]==1:
    d+=C[A[i]-1]
print(d)

n=int(input())
print(n**3)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
print(3**n)

n = int(input())

print(n**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print(3**int(input()))

print(int(input())**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
B = list(map(int,input().split()))
s = B[N-2]+B[0]
for i in range(N-2):
    s+=min(B[i],B[i+1])

print(s)

N=int(input())
print(N*N*N)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
from sys import stdin
N = [int(_) for _ in stdin.readline().rstrip().split()]
print(N**3)

from sys import stdin
N = int(stdin.readline().rstrip())
print(N**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print((int(input()))*3)

print((int(input()))**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = input()
N = int(N)

a_sub = input().split(" ")
a = [int(n0) for n0 in a_sub]
# print(a)

b_sub = input().split(" ")
b = [int(n0) for n0 in b_sub]
# print(b)

c_sub = input().split(" ")
c = [int(n0) for n0 in c_sub]
# print(c)

score = 0
for xi in range(N):
    score = score + b[xi]
    if a[xi+1]==a[xi]+1 and xi<N:
        score = score + c[a[xi]-1]
        print(xi, c[xi])

print(score)


N = input()
N = int(N)

a_sub = input().split(" ")
a = [int(n0) for n0 in a_sub]
# print(a)

b_sub = input().split(" ")
b = [int(n0) for n0 in b_sub]
# print(b)

c_sub = input().split(" ")
c = [int(n0) for n0 in c_sub]
# print(c)

score = 0
for xi in range(N-1):
    score = score + b[xi]
    if a[xi+1]==a[xi]+1:
        score = score + c[a[xi]-1]
        # print(xi, c[xi])
score = score + b[N-1]
print(score)


N = input()
print(N**3)

N = input()
N = int(N)

a_sub = input().split(" ")
a = [int(n0) for n0 in a_sub]
# print(a)

b_sub = input().split(" ")
b = [int(n0) for n0 in b_sub]
# print(b)

c_sub = input().split(" ")
c = [int(n0) for n0 in c_sub]
# print(c)

score = 0
for xi in range(N):
    score = score + b[xi]
    if a[xi+1]==a[xi]+1 and xi<N:
        score = score + c[a[xi]-1]
        # print(xi, c[xi])

print(score)


N = input()
N = int(N)

a_sub = input().split(" ")
a = [int(n0) for n0 in a_sub]
# print(a)

b_sub = input().split(" ")
b = [int(n0) for n0 in b_sub]
# print(b)

c_sub = input().split(" ")
c = [int(n0) for n0 in c_sub]
# print(c)

score = 0
for xi in range(N):
    score = score + b[xi]
    if a[xi+1]==a[xi]+1 and xi<N:
        score = score + c[a[xi]-1]
        print(xi, c[xi])

# print(score)

for xi in range(N-1):
    if a[xi+1]==a[xi]+1:
        score = score + c[a[xi]-1]
        print(xi, c[xi])
print(score)


N = input()
N = int(N)

a_sub = input().split(" ")
a = [int(n0) for n0 in a_sub]
# print(a)

b_sub = input().split(" ")
b = [int(n0) for n0 in b_sub]
# print(b)

c_sub = input().split(" ")
c = [int(n0) for n0 in c_sub]
# print(c)

score = 0
for xi in range(N):
    score = score + b[xi]
    if a[xi+1]==a[xi]+1 and xi<N-1:
        score = score + c[a[xi]-1]
        # print(xi, c[xi])

print(score)


N = input()
N = int(N)
print(N**3)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print(int(input())**３)

print(int(input())**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
result = (N-1)**3
print(result)

N = int(input())
result = N**3
print(result)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N=int(input())
print(N**2)

N=int(input())
print(N**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
s = list(map(int,input().split()))
for i in range(len(s)-1,0,-1):
    if(s[i]>s[i-1]):
        continue
    else:
        s[i-1] = s[i]
print(sum(s)+s[0])
        

n = int(input())
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input())
print(3*n)

n=int(input())
print(9*n)

n=int(input())
print(3**n)

n=int(input())
print(n*n*n)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = input()

print(N*N*N)

n = int(input())
print(n*n*n)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n =int(input())
print(n ** n)

print(int()input()*3)

print(int(input())*3)

print(int(input())**3)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print(int(input() ** 3))

print(int(input()) ** 3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())

for i in range(1,N+1):
    for j in range (1, N+1):
        for k in range (1, N+1):
            print(str(i)+str(j)+str(k))


N = int(input())

print(N**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = input()
print(N * N * N)


def fs(Q,n):
    l = len(Q) - 1
    res = 0
    for i in range(n + 2):
        res += Q[l - i]
        if res == 2:
            return l - i + 1
def main():
    N = int(input())
    B = list(map(int,input().split()))
    Q = [1] * N
    s = N - 1
    res = N - 1
    for i in range(N - 2):
        Q[i] = 0
        s = fs(Q,i)
        res += s
    s = N - 1
    for i in range(N - 3 ,0,-1):
        Q[i] = 0
        s = fs(Q,i)
        res += s
    print(res)

        
        

if __name__ == "__main__":
    
    main()
    

        

N = int(input())
print(N * N * N)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
num = int(input())
 
if num = 1:
  print(1)
else:
  print(num*num*num)

num = int(input())

if num = 1:
  print(1)
else:
  print(num**3)

num = int(input())
 
if num == 1:
  print(1)
else:
  print(num**3)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n=int(input()
print(n**3)

n=int(input())
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
I = int(intpu())
print(I*I*I)


I = int(input())
print(I*I*I)


Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

# print(N, A_LIST, B_LIST, C_LIST)

result = 0

for i in range(N):
    result += B[A[i] - 1]
    if i > 0 and A[i] - 1 == A[i-1]:
        result += C[A[i-1]-1]

print(result)
# 5+8+9+24+15+13


N = int(input())
print(N ** 3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
import itertools as it  
n=int(input())
li=[i for i in range(1,n+1)]
li=li*3
print(len(set(itertools.combinations(li,3))))


import itertools as it  
n=input()
n=int(n)
if n>=1 and n<=9:
	li=[i for i in range(1,n+1)]
	li=li*3
	print(len(set(itertools.combinations(li,3))))
else:
  pass

import itertools
n=input()
n=int(n)
if n>=1 and n<=9:
	li=[i for i in range(1,n+1)]
	li=li*3
	print(len(set(itertools.combinations(li,3))))
else:
  pass

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
x = int(input())
result = x **3
print(result

x = int(input())
result = x **3
print(result

x = int(input())
result = x ** 3
print(result)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input()

print(n**3)

n = int(input())

print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
password = n**2
print(password)

n = int(input())
print(n**3)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())

print(pow(n, 3)


n = int(input())

print(pow(n, 3))

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = input()
print(n**3)

N=int(input())
pass=N ** 3
print(pass)

n = int(input())
print(n**3)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = input(int())
print(N**3)


N = int(input())
print(N**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
i=input();print(i**3)

print(int(input())**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
print(2 ** n)

n = int(input())
print(3 ** n)

n = int(input())
print(n ** 3)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
print(n**n)

# -*- coding: utf-8 -*-
n = 0
for i in range(0, 1000):
  n += 1

print("{}".format(n))

# -*- coding: utf-8 -*-

a = int(input())
n*n*n

print("{}".format(n**3))

n = int(input())
print(n**3)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = input()

print(n**3)

n = int(input())

print(n**3)


Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print((input())^3)

print(int(input())**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = int(input())
A = list((map(int,input().split())))
B = list((map(int,input().split())))
C = list((map(int,input().split())))
 
total = sum(B)
point = 0
for i in range(len(A) - 1):
    if A[i] + 1 == A[i+1]:
        point = point+C[A[i-1]]
        print(point)
print(total+point)

n=int(input())
print(n**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
import sys,bisect as bs,collections as cl
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

n = onem()

p = [0] + l() + [n+1]
ans = 0
a = [0 for i in range(n+2)]

for i in range(n+2):
    a[p[i]] = i

l = [set() for i in range(n+2)]
r = [set() for i in range(n+2)]

for i in range(n+2):
    l[i].add(max(0,i-1))
    l[i].add(max(0,i-2))
    r[i].add(min(n+1,i+1))
    r[i].add(min(n+1,i+2))


for i in range(n+1):
    m = a[i]
    x2,x1,y1,y2 = min(l[m]),max(l[m]),min(r[m]),max(r[m])
    hoge= i*(abs((m-x1)*(y2-y1)) + abs((y1-m)*(x1-x2)))
    ans += hoge

    r[x1].clear()
    r[x1].add(y1)
    r[x1].add(y2)

    l[y1].clear()
    l[y1].add(x1)
    l[y1].add(x2)
    
    r[x2].clear()
    r[x2].add(x1)
    r[x2].add(y1)

    l[y2].clear()
    l[y2].add(y1)
    l[y2].add(x1)
    

print(ans)




import sys,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

n = onem()

print(n**3)


Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
len = input()
print(len**3)


len = input()
print(len**3)


len = int(input())
print(len**3)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N = import()
output = N*N*N
print(output)

N=int(input())
output=N*N*N
print(output)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input.strip())
print(n**3)

n = int(input().strip())

print(n^3)

n = int(input().strip())
print(n**3)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
var = int(input())

pas = var ** var

print(pas)

var = input()

pas = var ** var

print(pas)

var = int(input())

pas = var ** 3

print(pas)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print(int(input())**3

print(int(input())**3)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
N=input()
ans = N**3
print(ans)

n=input()
print(n**3)


N=int(input())
ans = N^3
print(ans)

N=input()
print(N**3)


N=input()
print(int(N**3))


n=input()
print(int(n**3))


N=int(input())
print(N^3)

N=input()
 print(N^3)

n=int(input())
print(n**3)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
answer = n * n * n
print(n)

n = int(input())
answer = n * n * n
print(answer)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
a = int(input())

b = pow(2,a);
print(b)


a = int(input())

b = pow(a,3);
print(b)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
i = int(input())

print(N**3)

N = int(input())

print(N**3)


Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
# -*- coding: utf-8 -*-

a = N * N * N

print(a)

# -*- coding: utf-8 -*-

a = 9*9*9

print(a)

a = int(input())
print(a*a*a)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n = input()
print(n ** 2)

n = int(input())
pow(n,3)
print(n

n = int(input())
pow(n,3)
print(n)

n = int(input())
a = pow(n,3)
print(a)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print(int(input()**3)

print(int(input()**3)

print(int(input())**3)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
import math
n = int(input())
print(Math.pow(3,n))

n = int(input())
p = n**3
print(p)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
print(3 ** int(input())

print(int(input() ** 3)

print(int(input()) ** 3)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is going to set a 3-character password.  How many possible passwords are there if each of its characters must be a digit between 1 and N (inclusive)?

Submission attempts (in order):
n, k = map(int, input().split())
s = input()
h = 0
for i in range(n-1):
    if s[i] == s[i+1]:
        h += 1
print(min(h + 2 * k, n - 1))

print(int(input())**3)

Verdicts: Runtime Error

Accepted