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: Runtime Error

Solution code:
def A(x):
  return x + x**2 + x**3



def main():
  print(A(input()))


if __name__ == '__main__':
  main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main(int argc, char const *argv[])
{
    long a;
    cin >> a;

    cout << a + a * a + a * a * a << endl;

    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()

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

Submission status: Runtime Error

Solution code:
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iomanip> // setprecision
#include <complex> // complex
#include <math.h> 
#include <climits> 
#include <assert.h>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
constexpr ll INF = 1e18;
constexpr int inf = 1e9;
constexpr ll mod = 1000000007;
constexpr ll mod2 = 998244353;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[8] = {1, 0, -1, 0,1,1,-1,-1};
const int dy[8] = {0, 1, 0, -1,1,-1,1,-1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
// ---------------------------------------------------------------------------


int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int a;
    cin >> a;
    cout << a + a*a + a*a*a << "\n";
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bis/stdc++.h>
using namespace std;
int main(void)
{
    long long int n;
    cin>>n;
    cout<<n+n*n+n*n*n;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from collections import deque
import math

def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]

a = int(input())
print((a**4-1)//(a-1)-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
"""
~~ Author : Bhaskar
~~ Dated : 10~06~2020
"""

import sys
from bisect import *
from math import floor,sqrt,ceil,factorial as F,gcd,pi
from itertools import chain,combinations,permutations,accumulate
from collections import Counter,defaultdict,OrderedDict,deque
from array import array
INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize)-1
mod = 1000000007
ch = "abcdefghijklmnopqrstuvwxyz"
lcm = lambda a,b : (a*b)//gcd(a,b)
setbit = lambda x : bin(x)[2:].count("1")
input = lambda : sys.stdin.readline()

def solve():
    n = int(sys.stdin.readline())
    print(a+a**2+a**3)


if __name__ == "__main__":
    try:
        sys.stdin = open('input.txt','r')
        sys.stdout = open('output.txt','w')
    except:
       pass
    solve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    # n = int(input())
    # l = [int(j) for j in input().split()]
    

    for t in range(int(input())):
        #n,m = [int(j) for j in input().split()]
        n = int(input())
        print(n+n**2+n**3)
# endregion

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
2import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    a = I()
    print(a+a**2+a**3)

Submission status: Runtime Error

Solution code:
a = int(input)

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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 = nis()
    print(i + i ** 2 + i ** 3)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:


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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a - int(input())

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back

typedef long long ll;

const ll MOD = 1e9+7;
const ll INF = 1e9+5;

int a, b, c, d, e, n, m, k;
string s, t, r;
char c1, c2, c3;

int A[200005];
int B[200005];
int C[200005];

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

Submission status: Runtime Error

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