Problem:


Score : 100 points

Problem Statement

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)?

Constraints

1 \leq N \leq 9

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print the number of possible passwords.

Sample Input 1

2

Sample Output 1

8

There are eight possible passwords: 111, 112, 121, 122, 211, 212, 221, and 222.

Sample Input 2

1

Sample Output 2

1

There is only one possible password if you can only use one kind of character.



Sample input:
2


Sample output:
8

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# if x < y:
#     z = x
# elif True:
#     z = y
# else:
#     z = 100
import sys,os,math
from collections import Counter, defaultdict
import bisect
from sys import stdin, stdout
from itertools import repeat


# n, k = map(int, raw_input().split())
# da = map(int, raw_input().split())
# db = map(int, raw_input().split())

def main():
    n = map(int, raw_input().split())[0]
    da = map(int, raw_input().split())
    da = [0] + da
    flag = True
    for i in range(1, n/2+1):
        if da[i] > da[i*2] and da[i] > da[i*2+1]:
            pass
        else:
            flag = False
    print "Yes" if flag else "No"


main()

Submission status: Runtime Error

Solution code:
N=int(input())
pass=N ** 3
print(pass)

Submission status: Runtime Error

Solution code:
import sys
N=input()

print(pow(N,3))

Submission status: Runtime Error

Solution code:
import sys
N=input()

pow(N,3)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))

res=0
back=0

for a in A:
	res=res+B[a-1]					#listは０スタート
	if back==a-1 and a!=len(A):		#A内の今考えている変数が前のと同じなら
		res=res+C[back-1]			#listは０スタート
	back=a
    
print(res)

Submission status: Runtime Error

Solution code:
n=input()
print(n**3)

Submission status: Runtime Error

Solution code:
n=input()
print(int(n**3))

Submission status: Runtime Error

Solution code:
N=input()
print(int(N**3))

Submission status: Runtime Error

Solution code:
N=input()
print(N**3)

Submission status: Runtime Error

Solution code:
N=input()
ans = N**3
print(ans)

Submission status: Runtime Error

Solution code:
N=input()
 print(N^3)

Submission status: Runtime Error

Solution code:
n = input()
print(n**3)

Submission status: Runtime Error

Solution code:
N = int(input())
la=input().split()
lb=input().split()
lc=input().split()

lc = lc+['0']
#print(lc)

total=0
for i in range(N):
    total = total+int(lb[i])+int(lc[i])
#print(total)

k = int(la[N-1])
#print(k)

print(total-int(lc[k-1]))

Submission status: Runtime Error

Solution code:
N = int(input())
la=input().split()
lb=input().split()
lc=input().split()

lc = lc+['0']
#print(lc)

total=0
for i in range(N-1):
    total =total+int(lb[i])+int(lc[i])

print(total-int(lc[int(la[N-1])]))

Submission status: Runtime Error

Solution code:
#input
N = int(input())
B = list(map(int, input().split()))

A = [0] * N
for i in range(1, N-1):
    if A[i] > B[i]:
        A[i] = B[i]
    A[i+1] = B[i]

print(sum(A))

Submission status: Runtime Error

Solution code:
n=int(inpt())
c=n**3
print(c)

Submission status: Runtime Error

Solution code:
s = int(input)
print(s**3)

Submission status: Runtime Error

Solution code:
print(int(input()))**3

Submission status: Runtime Error

Solution code:
print(int(input) ** 3)

Submission status: Runtime Error

Solution code:
N = input()
if N > 9 or N < 1:
    print("error")
else:
    password = N*3
    print(password)

Submission status: Runtime Error

Solution code:
import random as np
N = range(1,10)
password = N*N*N

Submission status: Runtime Error

Solution code:
I = int(intpu())
print(I*I*I)

Submission status: Runtime Error

Solution code:
#include<iostream>
#include <math.h>
using namespace std;

int main(){
    int use,ans;
    cin >> use;
    ans =pow(use, 3.0);
    cout << ans <<endl;
}

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
suf = 0
for i in range (n):
  if a[i]!= n-1:
  	men1 = a[i]
  	men2 = a[i + 1] 
  	suf += b[men1]
  	if (men1 + 1 == men2):
    	suf += c[men1]
  else:
    men1 = a[i]
    suf += b[men1]
print(suf)

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    a = input().split()
    b = input().split()
    c = input().split()
    score = 0
    for i in range(n):
        num = int(a[i])
        next = int(a[i-1])
        score += int(b[num-1])
        if next - num == 1:
            score += int(c[num-1])
    print(score)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))

ans=0
pre=-1

for i in a:
  ans += b[i-1]
  if(i==pre+1):
    ans += c[i-2]
  pre=i
  
print(ans)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
import sys
def b(bs, cs):
    #print(bs, xs[len(bs):])
    d = set()
    bl, cl = len(bs), len(cs)
    bi, ci = 0, 0
    while True:
      if bs[bi] > cs[ci]:
        bi += 1
        bs.append(cs[ci])
        del cs[ci]
      else:
        ci += 1
      if bi == bl or ci == len(cs):
        break
    if len(bs) != 2 * bl:
      print("No")
      sys.exit()
    return bs, cs

n=int(input())
xs = sorted(list(map(int,input().split())))[::-1]
bs, cs = xs[:1], xs[1:]
for _ in range(n):
    bs, cs = b(sorted(bs)[::-1], cs[::-1])

print("Yes")

Submission status: Runtime Error

Solution code:
import sys
def b(bs, cs):
    #print(bs, xs[len(bs):])
    d = set()
    bl, cl = len(bs), len(cs)
    bi, ci = 0, 0
	while True:
      if bs[bi] > cs[ci]:
        bi += 1
        bs.append(cs[ci])
        del cs[i]
      else:
        ci += 1
      if bi == bl or ci == cs:
        break
    if len(bs) != 2 * bl:
      print("No")
      sys.exit()
    return bs, cs

n=int(input())
xs = sorted(list(map(int,input().split())))[::-1]
bs, cs = xs[:1], xs[1:]
for _ in range(n):
    bs, cs = b(bs, cs)

print("Yes")

Submission status: Runtime Error

Solution code:
N=int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans=0
j=0

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

print(ans)

Submission status: Runtime Error

Solution code:
N = input()
password = N * N * N
print(password)

Submission status: Runtime Error

Solution code:
x = input()
if x == 1:
  print(″1″)
else:
  print(int(x) * int(x) * int(x))

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
 
ans = b[a[0]-1]
for i in range(1,n):
    ans += b[a[i]-1]
    if a[i] > a[i-1]:
        ans += c[a[i-1]-1]
print (ans)

Submission status: Runtime Error

Solution code:
N=input()
N*N*N

Submission status: Runtime Error

Solution code:
N=input()
N**3

Submission status: Runtime Error

Solution code:
2**N

Submission status: Runtime Error

Solution code:
S=input()
S*S*S

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = list(input())

p = 0
while K > 0 and p < len(S):
	now = S[p]
	p += 1
	if p >= len(S):
		break
	while now == S[p]:
		p += 1
		if p >= len(S):
			break

	q = p + 1
	if q >= len(S):
		"""
		if S[p] == "R":
			S[p] = "L"
		else:
			S[p] = "R"
		"""
		break
	while S[p] == S[q]:
		q += 1
		if q >= len(S):
			break
	while p < q:
		if S[p] == "R":
			S[p] = "L"
		else:
			S[p] = "R"
		p += 1
		if p >= len(S):
			break
	K -= 1

ret = 0;
print(len(S))
for x in range(len(S)-1):
	print(x)
	if S[x] == S[x + 1]:
		ret += 1
print(ret)

Submission status: Runtime Error

Solution code:
#include <iostream>

using namespace std;

int main(){
  int a;
  cin >> a;
  cout << a * a * a << endl;
  return 0;
}

Submission status: Runtime Error

Solution code:
N = input()
P = N**3
print(P)

Submission status: Runtime Error

Solution code:
class SegTree:

    def __init__(self, init_val, n, ide_ele, seg_func):
        self.segfunc = seg_func
        self.num = 2**(n-1).bit_length()
        self.ide_ele = ide_ele
        self.seg=[self.ide_ele]*2*self.num
        for i in range(n):
            self.seg[i+self.num-1]=init_val[i]    
        for i in range(self.num-2,-1,-1) :
            self.seg[i]=self.segfunc(self.seg[2*i+1],self.seg[2*i+2]) 
        
    def update(self, k, x):
        k += self.num-1
        self.seg[k] = x
        while k+1:
            k = (k-1)//2
            self.seg[k] = self.segfunc(self.seg[k*2+1],self.seg[k*2+2])
        
    def query(self, p, q):
        if q<=p:
            return self.ide_ele
        p += self.num-1
        q += self.num-2
        res=self.ide_ele
        while q-p>1:
            if p&1 == 0:
                res = self.segfunc(res,self.seg[p])
            if q&1 == 1:
                res = self.segfunc(res,self.seg[q])
                q -= 1
            p = p//2
            q = (q-1)//2
        if p == q:
            res = self.segfunc(res,self.seg[p])
        else:
            res = self.segfunc(self.segfunc(res,self.seg[p]),self.seg[q])
        return res

n = int(input())
xs = list(map(int, input().split()))
x2i = {}
for i, x in enumerate(xs):
    x2i[x] = i
ss1 = SegTree([n] * n, n, n, min)
ss2 = SegTree([-1] * n, n, -1, max)

r = 0
for x in range(n):
    x = n - x
    rmi2 = ss1.query(x2i[x]+1, n)
    if rmi2 != n:
        ss1.update(rmi2, n)
    rmi = ss1.query(x2i[x]+1, n)
    if rmi2 != n:
        ss1.update(rmi2, rmi2)

    lmi = ss2.query(0, x2i[x])
    if lmi != -1:
        ss2.update(lmi, -1)
    lmi2 = ss2.query(0, x2i[x])
    if lmi != -1:
        ss2.update(lmi, lmi)
    a,b,c,d =(x2i[x] - lmi), (lmi - lmi2), (rmi - rmi2), (rmi2 - x2i[x])
    r += (a*c + b*d) * x
#    print(x, r)
#    print(rmi, rmi2, lmi, lmi2)
    ss1.update(x2i[x], x2i[x])
    ss2.update(x2i[x], x2i[x])
print(r)

Submission status: Runtime Error

Solution code:
n=input()

print(n*n*n)

Submission status: Runtime Error

Solution code:
N = input()
print(pow(N,3))

Submission status: Runtime Error

Solution code:
N = input()
print(int(N*N*N))

Submission status: Runtime Error

Solution code:
input=()
print(N*N*N)

Submission status: Runtime Error

Solution code:
N = input()
print(N**3)

Submission status: Runtime Error

Solution code:
N = input()
print(str(N**3))

Submission status: Runtime Error

Solution code:
n=int(input())
print(n＊＊3)

Submission status: Runtime Error

Solution code:
N = input()
print(N * N * N)

Submission status: Runtime Error

Solution code:

N = int(input())
B = list(map(int, input().split()))
k = B[0]+B[-1]
A = [min(B[i],B[i+1] for i in range(N-2)]
C = sum(k + A)
print(C)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
m = sum(B)
for t in range(N-1):
    if a[t] + 1 == a[t + 1]:
        m += C[a[t] - 1]
print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
print(n**3))

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
N = int(input())
s = [input().split() for i in range(3)]

A = [int(i) for i in s[0]]
B = [int(i) for i in s[1]]
C = [int(i) for i in s[2]]

sum1 = sum(B)

for i in range(N-1):
 if (A[i]+1) == A[i+1]:
     sum1 += C[A[i]-1]

print(sum1)

Submission status: Runtime Error

Solution code:
N = int(input())

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

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

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

sum1 = sum(s1)

for i in range(N):
  if (s0[i]+1) == s0[i+1]:
    sum1 += s2[s0[i]-1]
  else :
    sum1=sum1

print(sum1)

Submission status: Runtime Error

Solution code:
import math
i=input()
print(math.factorial(i))

Submission status: Runtime Error

Solution code:
N = int(input())
B = list(map(int, input().split(" ")))

sum = 0

for ib, value in enumerate(B):
    if ib > 0:
        if value >= B[ib-1]:
            sum += B[ib-1]
        else:
            sum += value
    else:
        sum += value

sum += B[len(B) - 1]
print(sum)

Submission status: Runtime Error

Solution code:
import java.util.*;
import java.io.*;
class Main 
{
  public static void main(String[] args) 
  {
    Scanner sc=new Scanner(System.in);
    int a=sc.nextInt();
    if(a==1)
    {
      System.out.print(1);
    }
    else if(a==2)
    {
      System.out.print(8);
    }
    else{
      int c=0,m=0,n=0;
      m=a*(a-1);
      m=m/2;
      n=a*(a-1)*(a-2);
      n=n/6;
      m=m*8;
      n=n*6;
      System.out.print(m+n);
    }
    

  }
}

Submission status: Runtime Error

Solution code:
main():
  n = int(input())
  print(n**3)

if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
def main():
i=int(input())
print(i*i*i)

main()

Submission status: Runtime Error

Solution code:
N=input(">>")
print N*N*N

Submission status: Runtime Error

Solution code:
def main():
  n = int(input())
  pirnt(n**3)
  
main()

Submission status: Runtime Error

Solution code:
import math
n = int(input())
print(Math.pow(3,n))

Submission status: Runtime Error

Solution code:
n = input()
print(n*n*n)

Submission status: Runtime Error

Solution code:
N=input()
n=N*N*N
print(n)

Submission status: Runtime Error

Solution code:
N=int(input())
n=N*N*N
print(n

Submission status: Runtime Error

Solution code:
N = input()
print(N*N*N)

Submission status: Runtime Error

Solution code:
n=int(input('N'))
if n<10 or n>0:
    combination=n*n*n
    print(combination)
else:
    break

Submission status: Runtime Error

Solution code:
s = list(input())
t = list(input())

count = 0

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

print(count)

Submission status: Runtime Error

Solution code:
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]))

Submission status: Runtime Error

Solution code:
from sys import stdin
from math import factorial

n = int(stdin.readline().rstrip().split())

print(n**3)

Submission status: Runtime Error

Solution code:
n=int(input())
ans=1
for i in range 3:
  ans*=n
print(ans)

Submission status: Runtime Error

Solution code:
a = N^3
return a

Submission status: Runtime Error

Solution code:
N = int(input())
print(n**3)

Submission status: Runtime Error

Solution code:
import sys
import math

def input():
    return sys.stdin.readline().strip()

def iinput():
    return int(input())

def finput():
    return float(input())

def tinput():
    return input().split()

def rinput():
    return map(int, tinput())

def rlinput():
    return list(rinput())

def pro(k, l, n):
    if l < n:
        if k == 0:
            return(n - l)
        return (n - l + 2)
    if l == n:
        if k == 0:
            return 0
        elif k == 1:
            return 1
        return 3
    else:
        l -= n - 1
        if l == k:
            return 1
        elif l > k:
            return 0
        if l < k - 1:
            return 2
        else:
            return 3
            

def rt(k, l , n):
    if k < n:
        if l == 0:
            return (k * 2 + n)
        return (n + k * 2 - 1)
    elif k == n:
        if l == 1:
            return (k * 3 - 2)
        elif l == 0:
            return (k * 3)
        return (k * 3 - 3)
    else:
        k -= n - 1
        if k == l:
            return (n * 3 - 2)
        elif k > l:
            return (n * 3)
        if k < l - 1:
            return ((n - 1) * 3 - 1)
        else:
            return ((n - 1) * 3)



def main():
    a = iinput()
    print(q ** 3)
    
    
    


main()

Submission status: Runtime Error

Solution code:
N=int(input())
print(N**3

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
n = int(input())
a = list(map(int, input().split()))
a.sort()
parent = [a[-1]]
rest = a[:-1]

for _ in range(n):
    next_parent = []
    next_rest = []
    for i in parent[::-1]:
        while(rest):
            x = rest.pop()
            if x < i:
                next_parent.append(x)
                break
            else:
                next_rest.append(x)
                continue
    parent += next_parent
    parent.sort()
    next_rest.reverse()
    rest += next_rest

if len(parent) == 2**n:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N=long(input())
print(N**3)

Submission status: Runtime Error

Solution code:
N=input()
N=N*N*N
print(N)

Submission status: Runtime Error

Solution code:
N = input()
print(N^3)

Submission status: Runtime Error

Solution code:
n = int(input())
b = list(map(int, input().split()))

a = []

a.append(b[0])

for i in range(1, n-1):
  if b[i-1] <= b[i]:
    a.append(b[i-1])
  elif b[i] <= b[i+1]:
    a.append(b[i+1])
a.append(b[-1])
print(sum(a))

Submission status: Runtime Error

Solution code:
print(int(N)**3)

Submission status: Runtime Error

Solution code:

print(N**3)

Submission status: Runtime Error

Solution code:
print (N^3)

Submission status: Runtime Error

Solution code:
 print(n**3)

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
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))))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main() {
int i;
cin >> i;
cout << i*i*i ;




    
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main() {
int i;
cin >> i;
cout << i*i*i << endl;




    
}

Submission status: Runtime Error

Solution code:
class WeightBalancedTree:
    def __init__(self, q):
        self.left = [0] * (q + 1)
        self.right = [0] * (q + 1)
        self.weight = [1] * (q + 1)
        self.key = [None] * (q + 1)
        self.last_index = 0
        self.root = 0

# key 未満の最大値
    def search_lower(self, key):
        if key == None:
            return None
        ret = None
        idx = self.root
        while idx != 0:
            if self.key[idx] < key:
                ret = self.key[idx]
                idx = self.right[idx]
            else:
                idx = self.left[idx]
        return ret

# key 超過の最小値
    def search_higher(self, key):
        if key == None:
            return None
        ret = None
        idx = self.root
        while idx != 0:
            if self.key[idx] > key:
                ret = self.key[idx]
                idx = self.left[idx]
            else:
                idx = self.right[idx]
        return ret

# 要素の挿入
# 重複を考慮しない
# ToDo: 考慮するものも実装する
    def insert(self, key):
        self.last_index += 1
        self.key[self.last_index] = key
        self.weight[self.last_index] = 2
        self.root = self.__recursive_insert(self.root)

# insert の再帰実装に用いる
    def __recursive_insert(self, idx):
        if idx == 0:
            return self.last_index
        elif self.key[self.last_index] < self.key[idx]:
            self.left[idx] = self.__recursive_insert(self.left[idx])
            self.__fix(idx)
            return self.__fix_left_bias(idx)
        else:
            self.right[idx] = self.__recursive_insert(self.right[idx])
            self.__fix(idx)
            return self.__fix_right_bias(idx)

# ノードの weight を補正する
    def __fix(self, idx):
        self.weight[idx] = self.weight[self.left[idx]] + \
            self.weight[self.right[idx]]

# 左回転
    def __rotate_left(self, idx):
        right = self.right[idx]
        self.right[idx] = self.left[right]
        self.__fix(idx)
        self.left[right] = idx
        self.__fix(right)
        return right

# 右回転
    def __rotate_right(self, idx):
        left = self.left[idx]
        self.left[idx] = self.right[left]
        self.__fix(idx)
        self.right[left] = idx
        self.__fix(left)
        return left

# 左偏状態の補正
    def __fix_left_bias(self, idx):
        if self.weight[self.right[idx]] << 2 < self.weight[idx]:
            left = self.left[idx]
            if self.weight[self.left[left]] << 2 < self.weight[left]:
                self.left[idx] = self.__rotate_left(left)
            idx = self.__rotate_right(idx)
        return idx

# 右偏状態の補正
    def __fix_right_bias(self, idx):
        if self.weight[self.left[idx]] << 2 < self.weight[idx]:
            right = self.right[idx]
            if self.weight[self.right[right]] << 2 < self.weight[right]:
                self.right[idx] = self.__rotate_right(right)
            idx = self.__rotate_left(idx)
        return idx

# 要素数
    def size(self):
        return self.weight[self.root] - 1

# デバッグ用
    def dump(self):
        self.__dump(self.root, 0)

    def __dump(self, idx, dep):
        if idx != 0:
            self.__dump(self.right[idx], dep + 1)
            for _ in range(0, dep):
                print("   ", end="")
            print('i:{0},k:{1},l:{2},r:{3},w:{4}'.format(
                idx, self.key[idx], self.left[idx], self.right[idx], self.weight[idx]))
            self.__dump(self.left[idx], dep + 1)


def main():
    n = int(input())
    p = list(map(int, input().split()))
    idx = [0] * n
    for i in range(0, n):
        idx[i] = i
    idx.sort(key=lambda i: - p[i])
    t = WeightBalancedTree(n+2)
    t.insert(-1)
    t.insert(n)
    ans = 0
    for i in idx:
        nex = t.search_higher(i)
        nexnex = t.search_higher(nex)
        pre = t.search_lower(i)
        prepre = t.search_lower(pre)
        if prepre != None:
            ans += p[i] * (pre - prepre) * (nex - i)
        if nexnex != None:
            ans += p[i] * (i - pre) * (nexnex - nex)
        t.insert(i)
    print(ans)


main()

Submission status: Runtime Error

Solution code:
return (int(input()) ** 3)

Submission status: Runtime Error

Solution code:
N = int(input())
print(N**3

Submission status: Runtime Error

Solution code:
n = int(input())
print(n*n*n*)

Submission status: Runtime Error

Solution code:
a = input()
b = a ** 3
print(int(b))

Submission status: Runtime Error

Solution code:
a = input()
print(a**3)

Submission status: Runtime Error

Solution code:
a=str()
print(a*a*a)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
for i in range(len(a)):
  a[i] -= 1
b = list(map(int, input().split()))
c = list(map(int, input().split()))
m = 0
bef = -1
for i in range(n):
  m += b[a[i]]
  if(bef + 1 == a[i]):
    m += c[bef]
  bef = a[i]
print(m)

Submission status: Runtime Error

Solution code:
N=int(input())
return 2**N

Submission status: Runtime Error

Solution code:
a = input()
print(a*a*a)

Submission status: Runtime Error

Solution code:
package password;
import java.util.*;

public class Password {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Please enter a number between 1 and 9");
        int n = sc.nextInt();
        while(n <= 0 || n >= 9) {
            System.out.println("Please enter a number between 1 and 9");
            n = sc.nextInt();
        }
        System.out.println(n*n*n);
    }

}

Submission status: Runtime Error

Solution code:
import random

def password (a):
  # checking if a is in between 1 and 9 (inclusive)
  if (a < 10) and (a > 0):
    # creating a list which contains integers between 1 and a
    x = list(range(1, a)
    # creating a list to house the other lists
    z = []
    count = 0
    while True:      
        # if count is not changing, the length of z will be printed
        old_count, count = count, new_count
        if count == old_count:
             print(len(z))
             else:
             # a new list called y is created, a random integer will be appended
                y = []
                if len(y) == 0:
                     i = randint(0, len(x)-1)
                     y.append(x[i])
             # a different random integer will be chosen and if it's different to what's
             # already inside, it will be appended to y
                elif len(y) == 1:
                     i = randint(0, len(x)-1)
                     if y[0] != x[i]:
                        y.append(x[i])
                else:
             # a different random integer will be chosen and if it's different to what's
             # already inside, it will be appended to y
                     i = randint(0, len(x)-1)
                     if (y[0] != x[i]) and (y[1] != x[i]):
                        y.append(x[i])
             			if len(z) == 0:
                        	z.append(y)
                        	count += 1
             			else:
             				if z[i] != y:
             					z.append(y)
             					count += 1

Submission status: Runtime Error

Solution code:
n = int(input()
print(n**3)

Submission status: Runtime Error

Solution code:
input(int(N))
print(N**3)

Submission status: Runtime Error

Solution code:
N = int(input(N))
print(N**3)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
x = int(input())
result = x **3
print(result

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

ans = 0
for i in range(n):
    ans += b[a[i] - 1]
    if i>0 and a[i] == a[i-1]+1:
        ans += c[a[i-1]-1]
        
print(ans)

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

Solution code:
print(3 ** int(input())

Submission status: Runtime Error

Solution code:
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>

using namespace std;

// conversion
//------------------------------------------
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T> inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}

// math
//-------------------------------------------
template <class T> inline T sqr(T x) { return x * x; }

// typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

// container util
//------------------------------------------
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i, c)                                                             \
  for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort((c).begin(), (c).end())

// repetition
//------------------------------------------
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)

// constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);

// clear memory
#define CLR(a) memset((a), 0, sizeof(a))

// debug
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x)                                                               \
  cerr << #x << " = " << (x) << " (L" << __LINE__ << ")"                       \
       << " " << __FILE__ << endl;

void solve(long long N) {
  cout<<N*N*N<<endl;
}

int main() {
  long long N;
  scanf("%lld", &N);
  solve(N);
  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
s = input()
ans = 0

for i in range(n - 1):
    if s[i] == s[i + 1] :
        ans += 1
print(min(n-1, ans + 2 * k))

Submission status: Runtime Error

Solution code:
s = int(input())
print s

Submission status: Runtime Error

Solution code:
#132 a
s=list(input())
s.sort()
print(s)
if s[0]==s[1] and s[2]==s[3] and s[1]!=s[2]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
bl = [int(i) for i in input().split()]
bl.reverse()

v = bl[0]

for i in range(1,n-1):
    v += min(bl[i],bl[i-1])

v += bl[n-2]

print(v)

Submission status: Runtime Error

Solution code:
n = int(input())

bl = [int(i) for i in input().split()]
al = []
memo = 0
for idx,i in enumerate(bl[::-1]):
    if idx in (0,len(bl)):
        al.append(i)
    else:
        al.append(min(i,al[idx-1]))
    memo = i
    
al.append(bl[0])
print(sum(al))