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:
a = input()
a = int(a)
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:
N=int(input())
print(N+N*N+N*N*N)

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:
a = int(input())
print(a + a * a + a * a * a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=(int)(input())
y=x+(int)(pow(x,2))+(int)(pow(x,3))
print("{}".format(y))

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**3)

Submission status: Accepted

Solution code:
def solve():
    n = int(input())
    print(n+n**2+n**3)
# testcases = int(input())
# for i in range(testcases):
#     n = int(inpuy())
#     for io ionr age(tsettesfcases:
#         iif n==132:
#             the n 
solve()

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

Submission status: Accepted

Solution code:
#! python3
# coding:utf-8
 
def main():
    a = int(input())
    print(a+a**2+a**3)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a = int(input())

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

Submission status: Accepted

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

print(solution)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

def S(): return sys.stdin.readline().rstrip().split(' ')
def Ss(): return list(S())
def I(): return _I(Ss())
def Is(): return list(I())
def _I(ss): return map(int, ss) if len(ss) > 1 else int(ss[0])

a = I()
print(a + a*a + a*a*a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(istr, ostr):
    a = int(istr.readline())
    print(a + a * (a + a * a), file=ostr)


if __name__ == "__main__":
    import sys

    main(sys.stdin, sys.stdout)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
# b, c =
# a = int(input())
n = int(input())
# target_list = [int(i) for i in input().split()]

# 判定
print(str(n + n ** 2 + n ** 3))

Submission status: Accepted

Solution code:
a = int(input().strip())
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("{}".format(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 main():
    a = int(input())
    print(a + a*a + a*a*a)
    
if __name__ == "__main__":
    main()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(sum([a, a*a, a*a*a]))

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
# abc172_a.py
# https://atcoder.jp/contests/abc172/tasks/abc172_a

# A - Calc /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# 整数 aが入力されます。値 a+a2+a3を出力してください。

# 制約
#     1≤a≤10
#     aは整数である。

# 入力
# 入力は以下の形式で標準入力から与えられる。
# a

# 出力
# 値 a+a2+a3を整数として出力せよ。

# 入力例 1
# 2

# 出力例 1
# 14

# a=2のとき、a+a2+a3=2+22+23=2+4+8=14となります。

# 解答は整数として出力してください。14.0 などの出力は不正解と判定されます。

# 入力例 2
# 10

# 出力例 2
# 1110


def calculation(lines):
    a = int(lines[0])
    lines_result = list()
    lines_result.append(a+a**2+a**3)
    return lines_result


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2']
        lines_export = [14]
    if pattern == 2:
        lines_input = ['10']
        lines_export = [1110]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


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


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


def solve():
    A = int(input())
    print(A + A ** 2 + A ** 3)


def main():
    solve()


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())
print(N+N**2+N**3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
import sys
a = int(input())
if not ( 1 <= a <= 10 ): sys.exit()
if not isinstance(a,int): sys.exit()

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 -*-

def main():

    a = int(input())

    ans = a + a ** 2 + a ** 3

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    a=input()
    a=int(a)
    ans=a+a*a+a*a*a
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    a = int(readline().rstrip())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import itertools
import math
import sys

INF = float('inf')


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


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    print(solve(a))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())

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

Submission status: Accepted

Solution code:
a = int(input())
ans = 0
for i in range(1, 4):
    ans = ans + a**i
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy
 
## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
#    S = []
#    for _ in range(N):
#        S.append(list(input()))
 
N=int(input())
print(N+N**2+N**3)

Submission status: Accepted

Solution code:
from sys import stdin
import sys

a = int(stdin.readline().rstrip())

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

Submission status: Accepted

Solution code:
a = int(input())
print(f'{a+a**2+a**3}')

Submission status: Accepted

Solution code:
class tasi:

    def sum1(self,a):
        total = 0

        for i in range(3):
            total += a ** (i + 1)
    
        print(total)


a = int(input())
m = tasi()
m.sum1(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())

print(num+num**2+num**3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def a172(a):

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
""" Atcorder practice 20200719 """
# test programm for practice


def __main__():
    """ def for calc """
    num_input = int(input())
    if num_input < 1 or num_input > 10:
        raise ValueError
    #elif num_input % 1 != 0:
        #raise ValueError
    else:
        print(num_input + num_input**2 + num_input**3)


if __name__ == "__main__":
    __main__()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
import math
print(math.floor(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(int(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

class calculate:
    def __init__(self,a):
        self.check = a
    
    def get_ans(self,a):
        return a + a**2 + a**3

valuable = calculate(a)

#Sprint(valuable.check)

ans = valuable.get_ans(a)

print(ans)

Submission status: Accepted

Solution code:
a = int(input())

ans = a**3 + a**2 + a

print(ans)

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do(): 
    a=INT()
    print(a+a**2+a**3)
if __name__ == '__main__':
    do()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calc():
    # 入力
    a = int(input())
    # 計算処理
    result = 0
    for i in range(1,4):
        result += a ** i
    # 出力
    print(result)

calc()

Submission status: Accepted

Solution code:
a = int(input())

a2 = a*a
a3 = a2*a

print(a + a2 + a3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

print(int(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:
a = int(input())
answer = a+a*a+a*a*a
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
	
	n = int(input())
	print(n + n * n + n * n * n )

Submission status: Accepted

Solution code:
a = int(input())

sum = a + a*a +a*a*a

print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Code for A - Calc
# Use input() to fetch data from STDIN
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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


# 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
    print(solve(a))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = [n,n**2,n**3]
print(sum(a))

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
  return int(input())
def readInts():
  return list(map(int, input().split()))
def readChar():
  return input()
def readChars():
  return input().split()

a = readInt()
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
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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

print(int(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:
print((a:=int(input()))*(1+a+a*a))

Submission status: Accepted

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

a = I()

ans = a * (1 + a + a**2)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


print(u)

Submission status: Accepted

Solution code:
n=int(input())

u=int(n+n**2+n**3)

print(u)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc172/tasks/abc172_a

a= int(input("\n"))
print(a+ pow(a, 2)+ pow(a, 3))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
# from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np    # cumsum
# from bisect import bisect_left, bisect_right

def solve():
    a = II()

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

a = I()

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

print(ans)

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools
import copy
from collections import deque
from functools import reduce
from decimal import Decimal


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

x = x + x**2 + x**3
print(str(x))

Submission status: Accepted

Solution code:

def main():

    numero = int(input())
    suma = 0
    for i in range(1, 4):

        suma = suma + numero**i

    print(suma)

if __name__ == "__main__":
    main()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

ans = a + a ** 2 + a ** 3

print(ans)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random,resource

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a = I()

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


print(main())