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:
n=int(input())

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

Submission status: Accepted

Solution code:
#A
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:
# /usr/bin/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2, log10, pi
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key


INF=1001001001
__MOD__=(10**9)+7
yn = 'YNeos'
judge = False
cnt = 0
ans = None


def lcm(a, b):
    return (a*b) // gcd(a,b)

def intinput():
    return int(input())

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

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __radd__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x + self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x + self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rsub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x - self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x - self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rmul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rtruediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __rpow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(other.__x, self.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(other.__x, self.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")

    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x
    def __str__(self):
        return str(self.__x)



if __name__ == '__main__':
    N = intinput()


    # 出力
    print(N+N**2+N**3)

Submission status: Accepted

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

a = int(input())

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

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=int(input())
print(a+pow(a,2)+pow(a,3))

Submission status: Accepted

Solution code:
# 
import sys

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


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

Submission status: Accepted

Solution code:
import math
import sys

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

Submission status: Accepted

Solution code:
import math
#map(int,input().split())
#int(x) for x in input().split()
#for _ in range(int(input())):
n=int(input())
print(n+n*n+n**3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#N, M = map(int,input().split())
n = int(input())
print(n + n**2 + n**3)

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools


#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]


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


print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
### ----------------
### ここから
### ----------------

import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    #n,m,k=map(int, readline().rstrip().split())
    #arr=list(map(int, readline().rstrip().split()))
    a=int(readline())
    #ss=readline().rstrip()
    #yn(1)
    print(a+a**2+a**3)

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

### ----------------
### ここまで 
### ----------------

Submission status: Accepted

Solution code:
import sys
# from math import sqrt, gcd, ceil, log
from bisect import bisect_left
from collections import defaultdict, Counter
inp = sys.stdin.readline
read = lambda: list(map(int, inp().strip().split()))

# sys.setrecursionlimit(10**6)



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

		

if __name__ == "__main__":
	solve()

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
import heapq
from collections import defaultdict, deque
input = sys.stdin.readline
def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# template by 3xC and starkizard.
# contributors: 

#####################################################################################
from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""


# from bisect import bisect_left, bisect_right, insort
# from heapq import heappop, heapify, heappush
# from random import randint as rn
# from Queue import Queue as Q
# from copy import deepcopy
# from decimal import *
# import re
# import operator

#####################################################################################
# this enables you to write python3 code with PyPy2 (Python 2)
if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

#####################################################################################

"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""
# import threading
# threading.stack_size(1<<27)
# sys.setrecursionlimit(10000

def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    # Comment code out when you don't need inverse factorial or vice versa
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod

    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)

def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    #rdivisors=[]
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): # math.gcd is slower
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def check_sorted(a):
    ''' returns True/False '''
    for i in range(len(a)-1):
        if a[i]>a[i+1]:
            return False
    return True
def ceil(n, k=1): return n // k + (n % k != 0) #returns math.ceil but protecting against floating inconsistencies
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) #inputs integer
def mi(): return map(int, input().split()) # inputting space seperated variables for example x,y,z
def li(): return list(map(int, input().split())) #inputting a space seperated list of integers
def lw(): return input().split() #inputting a space seperated list of strings
def lcm(a, b): return abs(a * b) // gcd(a, b) #returns LCM of two arguments
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) #For printing an iterable with seperator sep as optional second argument (default : " "), ending character (default: "\n") as optional third
def dd(): return defaultdict(int) #returns a dictionary with values defaulted to 0
def ddl(): return defaultdict(list) #returns a dictionary with values defaulted to []
def write(s): return sys.stdout.write(s)












###################################################################

def main():
    #code goes here
    n=ii()
    print(n+ n*n + n*n*n)
""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""

py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

BUFSIZE = 8192

class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)


class IOWrapper(IOBase):

    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')

""" main function"""

if __name__ == '__main__':
    main()
    # threading.Thread(target=main).start()

Submission status: Accepted

Solution code:
import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

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

#処理内容
def main():
	a = int(input())
	ans = a + a ** 2 + a ** 3
	print(ans)
	




if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
from sys import stdin,stdout
LI=lambda:list(map(int,input().split()))
MAP=lambda:map(int,input().split())
IN=lambda:int(input())
S=lambda:input()
import math
def p(a):print(" ".join(list(map(str,a))))
from collections import Counter

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") # 無限

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

Submission status: Accepted

Solution code:

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


main()

Submission status: Accepted

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

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
#from collections import deque,defaultdict
from sys import stdin
input = stdin.readline
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

a = inn()
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())
d = a + a**2 + a**3
print(d)

Submission status: Accepted

Solution code:
i = int(input())

print(i + (i ** 2) + (i ** 3))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
a=int(input())

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

Submission status: Accepted

Solution code:
import sys
import math as mt
input=sys.stdin.buffer.readline  
t=1
#t=int(input())
for _ in range(t):
    n=int(input())
    #a,b,c=map(int,input().split())
    #l=list(map(int,input().split()))
    print(n+n**2+n**3)

Submission status: Accepted

Solution code:
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


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

    res = a + a ** 2 + a ** 3

    print(res)



main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os

str = int(input())

res = str + str*str + str*str*str
print(res)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
# x = list(map(int, input().split()))   :  int の リスト入力
# x, y = map(int, input().split())      :  それぞれの変数に　int 入力
# z = set(map(int, input().split()))    :
# t = int(input())                      :   

a = int(input())    

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

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:
#!/usr/bin/env python3


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())
ans = a+a**2+a**3

print(ans)

Submission status: Accepted

Solution code:

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:
nb = int(input())
print(str(nb + nb**2 + nb**3))

Submission status: Accepted

Solution code:
a=int(input())

ans=a+a*a+a*a*a
print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())

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

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** -10

a = INT()
ans = a + a**2 + a**3
print(ans)

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
def main():
    a = int(input())
    print(int(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)


if 'unittest' not in globals():
    resolve()

Submission status: Accepted

Solution code:

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:
# 幅優先探索（行きがけ）
import collections
import sys
import copy
import re


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    a = I()

    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:

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    print(n + pow(n, 2) + pow(n, 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 numpy as np

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    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 + pow(a,2)+ pow(a,3))

Submission status: Accepted

Solution code:
i = int(input())

print(i + i**2 + i**3)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

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

    print(ans)
    return


if __name__ == "__main__":
    main()
    sys.exit(0)

Submission status: Accepted

Solution code:
a = int (input())

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

Submission status: Accepted

Solution code:
from copy import deepcopy
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions
from operator import itemgetter
import itertools
import copy


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


def gcd(a, b):
    while(b != 0):
        a, b = b, a % b
    return a


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
a = int(input())
ans = a+a**2+a**3
print(ans)

Submission status: Accepted

Solution code:
import sys
import copy
from collections import deque
import collections
stdin = sys.stdin

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a = ni()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	A
# CreatedDate:  2020-06-27 20:55:08 +0900
# LastModified: 2020-06-27 21:00:24 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


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)

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

a = int(input())

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

Submission status: Accepted

Solution code:
import sys
import math
import numpy as np
import functools
import operator
import collections
import itertools

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
from operator import itemgetter
from collections import deque, Counter
import math
import pprint
from functools import reduce
# stdin = open("sample.txt")

MOD = 1000000007
INF = float('inf')
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

def keta(kazu): # 入力されたintを桁ごとに分解，リストで出力
    kazu_str = str(kazu)
    kazu_list = [int(kazu_str[i]) for i in range(0, len(kazu_str))]
    return kazu_list

def gcd(*numbers): # 最小公倍数
    return reduce(math.gcd, numbers)

def combination(m,n): # mCn
    
    if n > m:
        return 'すまん'
    return math.factorial(m) // (math.factorial(m-n) * math.factorial(n))

def pow_k(x,n):  # (x**n)の計算の高速化
    if n == 0:
        return 1
    K = 1
    while n > 1:
        if n % 2 != 0:
            K *= x
        x *= x
        n //= 2
    return K * x

def main():
    a = int(stdin.readline().rstrip())
    print(a+a*a+a*a*a)
main()

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

def main():

    input = stdin.readline

    a = int(input())

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import copy

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
# from operator import itemgetter
sysread = sys.stdin.readline
read = sys.stdin.read
sys.setrecursionlimit(10 ** 7)
#from heapq import heappop, heappush
#from collections import OrderedDict, defaultdict
#import math
#from itertools import product, accumulate, combinations, product
#import bisect# lower_bound etc
#import numpy as np
#from copy import deepcopy
#from collections import deque
#import numba

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



if __name__ == "__main__":
    run()

Submission status: Accepted

Solution code:
a=int(input())

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a = int(input())
print(a + a* a + a* a* a)

Submission status: Accepted

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

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*a + a*a*a)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    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**3)

Submission status: Accepted

Solution code:

from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

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