Problem:


Score : 100 points

Problem Statement

Given an integer a as input, print the value a + a^2 + a^3.

Constraints

1 \leq a \leq 10

a is an integer.

Input

Input is given from Standard Input in the following format:

a

Output

Print the value a + a^2 + a^3 as an integer.

Sample Input 1

2

Sample Output 1

14

When a = 2, we have a + a^2 + a^3 = 2 + 2^2 + 2^3 = 2 + 4 + 8 = 14.

Print the answer as an input. Outputs such as 14.0 will be judged as incorrect.

Sample Input 2

10

Sample Output 2

1110



Sample input:
2


Sample output:
14

Submission status: Accepted

Solution code:
def examA():
    N = I()
    ans = N + N**2 + N**3
    print(ans)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examA()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    a = int(input())
    print(a+(a**2)+(a**3))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    a = int(input())
    print(a + a**2 + a**3)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#Problem A

a = int(input())

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    print(n + n ** 2 + n ** 3)


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
n = int(input())

print(n+(n**2)+(n**3))

Submission status: Accepted

Solution code:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

a=one_int()

print(a**2 + a**3 + a)

Submission status: Accepted

Solution code:



a=int(input())
aa=a+a**2+a**3
print(aa)

Submission status: Accepted

Solution code:
# coding=UTF-8
from collections import deque
from collections import Counter
from operator import itemgetter
from bisect import bisect_left, bisect
from decimal import *
import itertools
import sys
import math
import numpy as np
import time
sys.setrecursionlimit(10**6)
input = sys.stdin.readline



def main():
    a = int(input())
    print(int(a+a**2+a**3))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda: readline().rstrip() # input string
ni = lambda: int(readline().rstrip()) # input int
nm = lambda: map(int, readline().split()) # input multiple int 
nl = lambda: list(map(int, readline().split())) # input multiple int to list

a = int(input())

print(a + a ** 2 + a ** 3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
from bisect import bisect,bisect_right,bisect_left

def get_int():
    return int(stdin.readline().strip())


def get_tuple():
    return map(int, stdin.readline().split())


def get_list():
    return list(map(int, stdin.readline().split()))

a = get_int()
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, deque, Counter
import math

# import copy
from bisect import bisect_left, bisect_right
# import heapq

# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)

def solve():
    n = getN()
    # s = getS()
    print(n + n * n + n * n* n)
def main():
    n = getN()
    for _ in range(n):
        solve()


if __name__ == "__main__":
    # main()
    solve()

Submission status: Accepted

Solution code:
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
#print(ans[j], end = "") 改行無しで出力
#[0]*n
a = int(input())

print(a+(a*a)+(a*a*a))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)

def main():
    N = int(input().strip())
    
    return N + N**2 + N**3

if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
# N, M = map(int, input().split())
# X = [[] for _ in range(N)]
# for i in range(N):
#     X[i] = list(map(int, input().split()))


print(a+pow(a,2) + pow(a,3))

Submission status: Accepted

Solution code:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import numpy as np

def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(map(int,input().split())))
    return np.array(x)

a = int(input())

print(a+a**2+a**3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

a, = map(int, input().split())

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

a=getN()

print(int(a+a**2+a**3))

Submission status: Accepted

Solution code:
a = int(input())
print(a+pow(a, 2)+pow(a, 3))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
ans = a + pow(a, 2) + pow(a, 3)
print(ans)

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())

    print(N + N ** 2 + N ** 3)


resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a =int(input())

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
import math
from collections import Counter
from decimal import Decimal

In = int(input())
print(In + In**2 + In**3)

Submission status: Accepted

Solution code:
a = int(input())
answer = a + a * a + a * a * a
print(answer)

Submission status: Accepted

Solution code:
N = int(input())

print(N + N ** 2 + N ** 3)

Submission status: Accepted

Solution code:
a = int (input())

print(a + a ** 2 + a ** 3)

Submission status: Accepted

Solution code:
a = int(input())

print(a + a ** 2 + a ** 3)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

a = int(input())

print(a + a ** 2 + a ** 3)

Submission status: Accepted

Solution code:
a = int(input())

b = int(a+a**2+a**3)
print(b)

Submission status: Accepted

Solution code:
#!/usr/bin python3
# -*- coding: utf-8 -*-

def main():
    N = int(input())

    print(N+N*N+N*N*N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input(''))

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
M = int(input())
print(M+M**3+M**2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())

ans = n + n**2 + n**3

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

#A,B = map(int,input().split())

#A = [int(input()) for i in range(N)]

"""
    A = []
    for _ in range(N):
        A.append(list(map(int,input().split())))
"""

print(N+N**2+N**3)

Submission status: Accepted

Solution code:
import sys
# import re
import math
import collections
# import decimal
import bisect
import itertools
import fractions
# import functools
import copy
# import heapq
import decimal
# import statistics
import queue

# import numpy as np

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===

def main():
    i = ni()
    print(i + i ** 2 + i ** 3)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin

A=int(stdin.readline())

print(A+A*A+A*A*A)

Submission status: Accepted

Solution code:

a = int(input())

print(a+ a**2 + a**3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

print(a + a** 2 + a** 3)

Submission status: Accepted

Solution code:
#!python3.8
# -*- coding: utf-8 -*-
# abc172/abc172_a
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    a = i2n()
    print(a + a**2 + a**3)
    return

main()

Submission status: Accepted

Solution code:
a = int(input())
x = a+a**2+a**3
print(x)

Submission status: Accepted

Solution code:
a = int(input())

print(a**2+a**3+a)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    N = int(readline())

    print(N + N**2 + N**3)




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
## coding: UTF-8
a = int(input())

print(a + a*a + a*a*a)

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
#S=input()
a=int(input())
#A,B=map(int, input().split())
#List=list(map(int, input().split()))
print(a+(a*a)+(a*a*a))

Submission status: Accepted

Solution code:

a = int(input())

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
# coding: UTF-8

a = int(input())

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
import sys

import math
import itertools

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

Submission status: Accepted

Solution code:
# AtCoder
a = int(input())
print(int(a+a**2+a**3))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(a: int):
    print(a+a**2+a**3)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    solve(a)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def resolve():
    a = int(input())
    print(a + a ** 2 + a ** 3)
    return
resolve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

from pprint import pprint
import sys

sys.setrecursionlimit(10 ** 6)


a = int(input())
res = a + a ** 2 + a ** 3
print(res)

Submission status: Accepted

Solution code:
import math
import fractions
import collections
import itertools
a=int(input())
print(a+pow(a,2)+pow(a,3))

Submission status: Accepted

Solution code:
a = int(input())
#a = list(map(int, input().split()))
print(a+a**2+a**3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,
                  log2, pi, radians, sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits


def inp():
    return(int(input()))


def inlist():
    return(list(map(int, input().split())))


def instr():
    s = input()
    return(list(s[:len(s)]))


def invr():
    return(map(int, input().split()))


a = inp()

print(a + a*a + a*a*a)

Submission status: Accepted

Solution code:
a = int(input())
ans = a++a**2+a**3
print(ans)

Submission status: Accepted

Solution code:
a = int(input())
# a = [int(_) for _ in input().split()]
print(a + a**2 + a**3)

Submission status: Accepted

Solution code:
import sys
import math
def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
n = II()
print(n+n**2+n**3)

Submission status: Accepted

Solution code:
a=int(input())

b=a+a*a + a*a*a

print(b)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

A = int(input())
print(A + A ** 2 + A ** 3)

Submission status: Accepted

Solution code:
import itertools
import decimal
import math
from collections import Counter
import sys
input = sys.stdin.readline

A=int(input())
print(A+A**2+A**3)

Submission status: Accepted

Solution code:
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
a=int(input())
print(a+a*a+a*a*a)

Submission status: Accepted

Solution code:
a=int(input())


print(a+a**2+a**3)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
def solve():
    a = int(input())

    
    return a + a**2 + a**3


print(solve())

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
print(n+n*n+n*n*n)

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import math

# A, B, C = [int(x) for x in stdin.readline().rstrip().split()]
# A = list(map(int, input().split()))
a=int(input())
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
input = raw_input

a = int(input())
a2 = a ** 2
a3 = a ** 3
out = a + a2+ a3
print(out)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    a = int(input())
    print(a+a**2+a**3)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

a = int(input())
res = a + a**2 + a**3

print(res)

Submission status: Accepted

Solution code:
import sys
import numpy as np
import math  # gcdもあるよ
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化

def main():
    n = int(sys.stdin.readline())
    print(n+n**2+n**3)
    return 0

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest


def resolve():
    # s = input()
    n = int(input())
    # a, b = map(int, input().split())
    # l = [list(map(int, input().split())) for _ in range(n)]

    print(n + n **2 + n **3)

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2"""
        output = """14"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """10"""
        output = """1110"""
        self.assertIO(input, output)


if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


a = z()
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
a = int(input())

print(a + a **2 + a**3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# A

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

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

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    print(a+a**2+a**3)
        

    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A = int(input())

print(A + A ** 2 + A ** 3)

Submission status: Accepted

Solution code:
import bisect
import sys
import math
from collections import deque
from heapq import heappush, heappop

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


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


def isRaw():
    return list(map(int, ssRaw()))


INF = 1 << 29

#DIV = (10**9) + 7
DIV = 998244353

def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max, mod=DIV):
    fac, finv, inv = [0]*max, [0]*max, [0]*max
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod - inv[mod % i] * (mod//i) % mod
        finv[i] = finv[i-1]*inv[i] % mod

    class CONV:
        def __init__(self):
            self.fac = fac
            self.finv = finv
            pass

        def ncr(self, n, k):
            if(n < k):
                return 0
            if(n < 0 or k < 0):
                return 0
            return fac[n]*(finv[k]*finv[n-k] % DIV) % DIV

    return CONV()


def cumsum(As):
    s = 0
    for a in As:
        s += a
        yield s


sys.setrecursionlimit(200005)


def dijkstra(G,start=0):
    heap = []
    cost = [INF]*len(G)
    heappush(heap,(0,start))
    while len(heap)!=0:
        c,n = heappop(heap)
        if cost[n] !=INF:
            continue
        cost[n]=c
        for e in G[n]:
            ec,v = e
            if cost[v]!=INF:
                continue
            heappush(heap,(ec+c,v))
    return cost


def main():
    a = iRaw()
    ans = a + a**2 + a**3
    print(ans)




main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    a = int(ipt())
    print(a+a**2+a**3)

    return

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline

a = int(input())

print(a ** 3 + a ** 2 + a)

Submission status: Accepted

Solution code:
i=int(input())
print(i+i**2+i**3)

Submission status: Accepted

Solution code:
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

a = INT()

print(a + a**2 + a**3)

Submission status: Accepted

Solution code:
a = int(input())
# w = list(map(int, input().split()))
#n, k = list(map(int, input().split()))
#a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]
#q = int(input())
#p = list(map(int, input().split()))
#a = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
#bc = [list(map(int, input().split())) for i in range(q)]
# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10)))
print(a+a*a+a*a*a)

Submission status: Accepted

Solution code:
n=int(input())

print(n+n**2+n**3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a = int(input())

    print(a+a**2+a**3)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    a = int(input())
    print(a+a*a+a*a*a)
resolve()

Submission status: Accepted

Solution code:
def main():
    a = int( input())
    print(a+a**2+a**3)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()


def main():
    a = int(input())
    print(a + a ** 2 + a ** 3)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub


import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(buff_readline())


def read_int_n():
    return list(map(int, buff_readline().split()))


def read_float():
    return float(buff_readline())


def read_float_n():
    return list(map(float, buff_readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()

def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A):
    return A + A**2 + A**3


def main():
    A = read_int()
    print(slv(A))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())

print(a**3+a**2+a**1)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    print(N + N**2 + N**3)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    s = int(input())
    print(s+(s**2)+(s**3))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# A - Calc

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

Submission status: Accepted

Solution code:
N = int(input())

ans = N + N*N + N*N*N

print(ans)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


def readstr():
    return input().strip()


def readint():
    return int(input())


def readnums():
    return map(int, input().split())


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


def main():
    N = readint()
    print(N + N ** 2 + N ** 3)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
print(n + n**2 + n**3)

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    a = I()

    print(a+a**2+a**3)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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

Submission status: Accepted

Solution code:
#

import sys
input=sys.stdin.readline

def main():
    a=int(input())
    print(a+a**2+a**3)
    
    
    
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
def resolve():
    a = int(input())
    print(a+a**2+a**3)
resolve()

Submission status: Accepted

Solution code:
def main():
    a=int(input())
    print(a+a**2+a**3)
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    print(a + a ** 2 + a ** 3)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys 
input = lambda:sys.stdin.readline().strip()
a = int(input())
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
a = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
# = [int(input()) for i in range(N)]
# = [list(map(int, input().split())) for i in range(N)]

print(a + a**2 + a**3)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

Submission status: Accepted

Solution code:

def resolve():
    a = int(input())
    print(a + a**2 + a**3)
if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
from math import gcd
from math import floor
def main():
    a = int(input())
    r = a + a**2 + a**3
    print(r)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
print(a + a*a + a*a*a);

Submission status: Accepted

Solution code:
i = int(input())
print(i+i*i+i*i*i)

Submission status: Accepted

Solution code:
import math
from collections import defaultdict
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""

n=ii()
print(n+n*n+n*n*n)

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())
a = I()
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n = i_input()

    print(n + pow(n, 2) + pow(n, 3))
 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a=int(input())
#a=map(int,input().split())

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
a=int(input())
ans=a+a**2+a**3
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

if __name__ == '__main__':
  a=int(input())
  print(a+a**2+a**3)

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    print(a + a**2 + a**3)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(raw_input())
print a + (a ** 2) + (a ** 3)

Submission status: Accepted

Solution code:
a = int(input())

print(a + a**2 +a **3)