Problem:


Score : 100 points

Problem Statement

It is known that the area of a regular dodecagon inscribed in a circle of radius a is 3a^2.

Given an integer r, find the area of a regular dodecagon inscribed in a circle of radius r.

Constraints

1 \leq r \leq 100

r is an integer.

Input

Input is given from Standard Input in the following format:

r

Output

Print an integer representing the area of the regular dodecagon.

Sample Input 1

4

Sample Output 1

48

The area of the regular dodecagon is 3 \times 4^2 = 48.

Sample Input 2

15

Sample Output 2

675

Sample Input 3

80

Sample Output 3

19200



Sample input:
4


Sample output:
48

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

r = INT()

print(3*r**2)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
r = int(input())
# 出力
print(3*r*r)

Submission status: Accepted

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

def main():
    r = i2n()
    print(3 * r * r)

main()

Submission status: Accepted

Solution code:

r = int(input())

print(3*r**2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = int(input())

print(3 * r * r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    R = INT()
    print(3* R*R)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc134/tasks/abc134_a
r = int(input())

print(3 * r ** 2)

Submission status: Accepted

Solution code:
r = int(input())


print(3*r**2)

Submission status: Accepted

Solution code:
# from sys import exit, stderr
# from inspect import currentframe
# def debug(*args):
#     names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
#     print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args), file=stderr)
#     return
# A, B, C = [int(n) for n in input().split()]
N = int(input())
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# INF = 10000000002
# EPS = 1e-9
# exit()
print(3*N**2)

Submission status: Accepted

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

import sys
import math
import bisect
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
mod = 10**9 + 7

r = int(input())
print(3*r**2)

Submission status: Accepted

Solution code:

N=int(input())

print(3*N**2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#

import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

def main():
    r = int(input())
    print(3 * r * r)

if __name__ == '__main__':
    main()

Submission status: Accepted

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


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
#!/usr/bin/env pypy
from __future__ import division, print_function

import os
import sys
from __builtin__ import xrange as range
from cStringIO import StringIO
from future_builtins import ascii, filter, hex, map, oct, zip
from io import IOBase

import __pypy__


def main():
    print(3 * int(input())**2)


# region fastio

BUFSIZE = 8192


class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count("\n") + (not b)
            ptr = self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
        self.newlines -= 1
        return self._buffer.readline()


class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()


def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k=int(input())

print(3*k*k)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
r = int(input())
print(3 * r**2)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(r: int):
    print(r*r*3)
    return


def main():

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from fractions import gcd
from itertools import groupby as gb
from itertools import permutations as perm
from itertools import combinations as comb
from collections import Counter as C
from collections import defaultdict as dd
sys.setrecursionlimit(10**5)
def y(f):
    if f:
        print('Yes')
    else:
        print('No')
def Y(f):
    if f:
        print('YES')
    else:
        print('NO')

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline())[:-1]
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)]

sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    n = I()
    print(3*n**2)
    return

#B
def B():
    n = I()

    return

#C
def C():
    n = I()

    return

#D
def D():
    n = I()

    return

#E
def E():
    n = I()

    return

#F
def F():
    n = I()

    return

#Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

r = inp()
print(3*r*r)

Submission status: Accepted

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
r = input()

print(3*r**2)

Submission status: Runtime Error

Solution code:
n=int(input())
a = [int(input()) for _ in range(n)]
b = max(a)
c = a.index(b)
for i in range(n):
        if i == c:
                print(max(sorted(a)[:n-1]))
        else:
                print(b)

Submission status: Runtime Error

Solution code:
from collections import Counter

N = int(input())
a = [int(input()) for _ in range(N)]

def solve(n,a):
  d = Counter(a)
  if len(d) == 1:
    return a
  d_lst = list(sorted(d.keys()))
  first = d_lst[-1]
  second = d_lst[-2]
  if d[first] != 1:
    return [first]*n
  else: # first は一つだけ
    return [second if a[i] == first else first for i in range(n)]

print(*solve(N,a),sep="\n")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
using System;

class Test
{
    public static void Main()
    {
        int a;
        a=int.Parse(Console.ReadLine());
        a = 3 * a * a * a;
        Console.WriteLine(a);
    }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]

m = max(a)

for i in range(n):
    if m >= a[i]:
        print(m)
    else:
        b = a[i]
        a.remove(b)
        print(max(a))
        a.insert(i,b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
print(3*int(input)**2)

Submission status: Runtime Error

Solution code:
print(a*int(input())**2)

Submission status: Runtime Error

Solution code:
print(3*a**2)

Submission status: Runtime Error

Solution code:
import numpy as np

n = int(input())
A = np.array(list(map(int,input().split())))

balls = np.array([0]*(n+1))

for i in range(1,n+1):
    s = sum(balls[n+1-i::n+1-i])
    if s%2 != A[-i]:
        balls[-i] += 1

#print(balls)

ans = np.where(balls==1)[0].tolist()
if sum(balls):
    print(sum(balls))
    print(*ans)
else:
    print(0)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for _ in range(n)]

max_1st = max(a)
max_2nd = sorted(a)[-2]
for i in range(n):
    if a[i] == max_1st:
        print(max_2nd)
    else:
        print(max_1st)

Submission status: Runtime Error

Solution code:
N=int(input())
A=[int(input()) for i in range(N)]
M=max(A)
sort_A=sorted(A, reverse=True)

for j in range(N):
    if A[j]==M:
        if A.count(M)==1:
            print(sort_A[1])
        else:
            print(M)
    else:
        print(M)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

a = [int(input()) for i in range(n)]
a_max = max(a)
a2 = a[:]
a2.remove(a_max)
a_second_max = max(a2)

for i in range(n):
    if a[i] == a_max:
        print(a_second_max)
    else:
        print(a_max)

Submission status: Runtime Error

Solution code:
rint(3*int(input())**2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def solve():
    n=int(input())
    num=[]
    def append(num1):
        num.append(num1)
    def count1(num2):
        return num.count(num2)
    for i in range(n):
        a=int(input())
        append(a)
    max1=max(num)
    count=count1(max1)
    if count>1:
        for i in range(n):
            print(max1)
    else:
        for i in range(n):
            if num[i]==max1:
                if i==0:
                    print(max(num[1:]))
                elif i==n-1:
                    print(max(num[:n-1]))
                else:
                    print(max(max(num[:i]),max(num[i+1:])))
            else:
                print(max1)
solve()

Submission status: Runtime Error

Solution code:
import collections
import heapq
n = int(raw_input())
ais = [0] + map(int, raw_input().split()) 
#print ais
res = [0 for __ in range(n +1)]
for u in range(n, 0, -1):
	c = u*2
	cumul = 0
	while(c <= n):
		cumul += res[c]
		c += u
	if ais[u] != (cumul % 2): 
		res[u] = 1
s = sum(res)
print s
if s:
	print ' '.join([str(i) for i in range(len(res)) if res[i] == 1])

Submission status: Runtime Error

Solution code:
def solve():
    n=int(input())
    a=[int(input()) for _ in range(n)]
    num1=max(a)
    count=0
    while count!=n:
        if a[count]==num1:
            if count==0:
                print(max(a[1:]))
            elif count==n-1:
                print(max(a[:n-1]))
            else:
                print(max(max(a[:count]),max(a[count+1:])))
        else:
            print(num1)
        count+=1
solve()

Submission status: Runtime Error

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

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
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 main():
    r = I()
    print(3 * a * a)

main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
a = list(map(int, input().split()))
ans = list(np.zores(N, dtype = int))
ans2 = []
for i in range(N):
    p = N - 1 - i
    if a[p] != sum(ans[p::p + 1]) % 2:
        ans[p] = 1
        ans2.append(str(p + 1))
print(sum(ans))
print(" ".join(ans2))

Submission status: Runtime Error

Solution code:
from collections import deque
from bisect import bisect_left
N=int(input())
li=[]
ans=0
for i in range(N):
    a=-int(input())
    b=bisect_left(li,a+1)
    if b==len(li):
        li.append(a)
        ans+=1
    else:
        li[b]=a
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
#print(a)
lm = [0] * n
rm = [0] * n

for i in range(1, n):
    lm[i] = max(a[i-1], lm[i-1])

for i in range(n-2, -1, -1):
    rm[i] = max(a[i+1], rm[i+1])


for i in range(n):
    print(max(lm[i], rm[i]))

Submission status: Runtime Error

Solution code:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
#print(a)
lm = [0]
rm = [0]

for i in range(n-1):
    lm.append(max(a[i], lm[i]))

for i in range(n-1, 0, -1):
    rm.insert(0, (max(a[i], rm[n-i-1])))

#print(lm)
#print(rm)

for i in range(n):
    print(max(lm[i], rm[i]))

Submission status: Runtime Error

Solution code:
# -*- coding: <encode name> -*-

r = int(input())
input(3 * (r ** 2))

Submission status: Runtime Error

Solution code:
# -*- coding: <encode name> -*-

r = int(input())
input(3 * r * r)

Submission status: Runtime Error

Solution code:
N=int(input())
A=[int(input()) for _ in range(N)]
ll=sorted(A)
a=max(A)
b=ll[-2]
  
for n in A:
  if n==a:
    print(b)
  else:
    print(a)

Submission status: Runtime Error

Solution code:
N=int(input())
A=[int(input()) for i in range(N)] 
B=sorted(A)
for i in A:
    if i==B[-1]:
        print(B[-2])
    else:
        print(B[-1])

Submission status: Runtime Error

Solution code:
inNum = int(input())

intArr = []

sortArr = []
while(inNum > 0):
    tempNum =int(input())
    intArr.append(tempNum)
    inNum = inNum-1
    if(not tempNum in sortArr):
        sortArr.append(tempNum)
sortArr  = sorted(sortArr, reverse = True)

for x in range(len(intArr)):
    if(not intArr[x] == sortArr[0]):
        print(sortArr[0])
    if(intArr[x] == sortArr[0]):
        print(sortArr[1])

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
if n == 1:
  print(1)
  exit()
  
chk = []
for i in range(n):
  a = int(input())
  chk.append(a)
  
from bisect import bisect_left,insort_left
from collections import deque
ans = 1

c = deque([])
for j in chk:
  if i == 0:
    c.append(j)
  else:
    ind = bisect_left(c,j)
    if ind == 0:
      ans += 1
      c.appendleft(j)
    else:
      c[ind-1] = (j)
      
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
A=[int(input()) for i in range(N)]
D=sorted(A)
num=max(D)
num2=D[-2]
for i in range(N):
    if A[i]==num:
        print(num2)
    else:
        print(num)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = []
for _ in range(N):
    A.append(input())

B = sorted(A, reverse=True)
max_first = B[0]
max_second = B[1]

for i in range(N):
    if A[i] != max_first:
        print(max_first)
    else:
        print(max_second)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
r=int(input())
S=3r**2
print(S）

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    p_l = list(map(int, input().split()))
    cnt = 0
    for i in range(n):
        if p_l[i] == i + 1: continue
        else: cnt += 1
    if cnt > 2: print("NO")
    else: print("YES")
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
result = []
for i in range(N):
    C = A[i]
    A[i] = 0
    result.append(max(A))
    A[i] = C

for a in result:
    print(a)

Submission status: Runtime Error

Solution code:
import bisect
N=int(input())
A=[int(input()) for _ in range(N)]
color=[]
A=A[::-1]
for a in A:
    i=bisect.bisect_left(color,a)
    if i==len(color):
        color.append(a)
    else:
        color[i]=a
print(len(color))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
r=I()
print(3*r*r)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from bisect import bisect_left
N, M, X = map(int, input().split())
A = sorted(list(map(int, input().split())))
index = bisect_left(A, X)
print(min(len(A[:index]), len(A[index:])))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A_list = []
for i in range(N):
    A = int(input())
    A_list.append(A)
sort_A = sorted(A_list, reverse = True)
k = 0
for i in range(1, len(sort_A)):
    if sort_A[i] != sort_A[i-1]:
        A_second = sort_A[i]
        break
    if i == len(sort_A)-1:
        A_second = sort_A[0]
for i in range(N):
    if A_list[i] == sort_A[0]:
        print(A_second)
    else:
        print(sort_A[0])

Submission status: Runtime Error

Solution code:
print(3 * r ** 2)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
M = max(A)
c = A.count(M)
a = list(set(A))
a.sort(reverse=True)
 
for i in range(N):
  if A[i] != M:
    print(M)
  else:
    if c >= 2:
      print(M)
    else:
      print(a[1])

Submission status: Runtime Error

Solution code:
N = int(input())
a = []
for i in range(N):
  a.append(int(input()))
a_copy = sorted(a, reverse=True)


for i in range(N):
    if a[i] == a_copy[0]:
        print(a_copy[1])
    else:
        print(a_copy[0])

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
b = sorted(a)

for A in a:
    if A == b[n - 1]:
        print(b[n - 2])
    else:
        print(b[n - 1])

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
b = sorted(a)

for A in a:
    if A == b[n - 1]:
        print(b[n - 2])
    else:
        print(b[n - 1])

Submission status: Runtime Error

Solution code:
import sys
import numpy as np

input = sys.stdin.readline
n = int(input())
s = list(int(input()) for _ in range(n))
i = 0
maxn = 0
s2 = []
while i < n:
    s2 = s.copy()
    del s2[i]
    print(np.max(np.array(s2)))
    i += 1

Submission status: Runtime Error

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

def main():
	N = int(input())
	a = list(map(int,input().split()))
	ball = []
	ballNum = 0
	f = [0]*N

	for i in reversed(range(N)):
		if (sum(f[0::(i+1)]) % 2) != (a[i] % 2):
			f[i] = 1
			ball.append(i+1)
			ballNum +=1

	print(ballNum)
	print(*ball)

if __name__ == "__main__":
	main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = []
for i in range(N):
    a = int(input())
    A.append(a)

B = sorted(A)
maxA = B[-1]
maxA2 = B[-2]


for i in range(N):
    if A[i] == maxA:
        print(maxA2)
    else:
        print(maxA)

Submission status: Runtime Error

Solution code:
n = int(input())
nums = []
for i in range(n):
  nums.append(int(input()))
cache = sorted(nums)
maximum = nums[0]
second = nums[1]
if maximum == second:
  flag = True
else:
  flag = False
for i in nums:
  if i == maximum && !flag:
    print(second)
  else:
    print(maximum)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
B = [int(i) for i in input().split()]
S = [0]*N
cnt = 0
for i in range(N-1, -1, -1):
  A = S[i::i+1]
  if sum(A)%2 == B[i]:
    continue
  elif sum(A)%2 == 0 and B[i] == 1:
    S[i] += 1
    cnt += 1
  elif sum(A)%2 == 1 and B[i] == 0:
    S[i] += 1
    cnt += 1
print(cnt)
for i in range(N):
  if S[i] == 1:
    print(i+1, end=" ")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
#define _overload3(_1,_2,_3,_4,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,n) (int i=a;i<n;i++)
#define per(i,a,n,s) (int i=n-1;i>=a;i--)
#define range(...) _overload3(__VA_ARGS__,per,repi,_rep,)(__VA_ARGS__)
#define all(x) (x).begin(),(x).end()
#define vecin(x) for(auto&youso_: (x) ) cin >>  youso_
#define vecout(x) for(auto&youso_: (x) ) cout << youso_ << " " ; cout << endl
template<class T>inline bool chmax(T &a, const T b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>inline bool chmin(T &a, const T b) { if (b<a) { a=b; return 1; } return 0; }
const int inf = 1e9+10;
const int mod = 1e9+7;
const long long llinf = 1e18;
#define _GLIBCXX_DEBUG
// head

int main(){
    int r;
    cin >> r;
    cout << 3*r*r << endl;
}

Submission status: Runtime Error

Solution code:
import bisect
n=int(input())
A=[int(input())]
for i in range(n-1):
  a=int(input())
  b=bisect.bisect_right(A,a,lo=0,hi=len(A))
  if b!=0 and A[b-1]<a:
    A[b-1]=a
  elif A[b-1]==a:
    b=bisect.bisect_right(A,a-1,lo=0,hi=len(A))
    if b!=0:
      A[b-1]=a
    else:
      A.insert(0,a)
  else:
    A.insert(0,a)
print(len(A))

Submission status: Runtime Error

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

i=n-1
while i>=0:
	if A[i]==1:
		break
	i-=1

if i==-1:
	print(0)
elif i==0:
	print(1)
	print(1)
else:
	i=(i+1)//2-1
	while i>=0:
		B=[A[j] for j in range(i,n,i+1)]
		r=sum(B[1:])
		
		A[i]=A[i]^r%2
		
		i-=1
		C=[m for m,k in enumerate(A,1) if k!=0]
		print(len(C))
		print(*C)

Submission status: Runtime Error

Solution code:
def solve():
	N, *A = map(int, open(0).read().split())

	top = [A[0]]
	for i in range(1, N):
		da_min = 10**9
		color = -1
		for j in range(len(top)):
			da = A[i] - top[j]
			if da > 0:
				if da_min > da:
					da_min = da
					color = j
		if color != -1:
			top[color] = A[i]
		else:
			top.append(A[i])

	print(len(top))


if __name__ == '__main__':
	solve()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
read r
echo $((3*r*r))

Submission status: Runtime Error

Solution code:
read r
echo $((3**r*r))

Submission status: Runtime Error

Solution code:
N = int(input()) 
A = []

for i in range(N):
    A.append(int(input()))

max_A = max(A)
max_c = A.count(max_A)

for i in range(N):
    if A[i] != max_A :
        print(max_A)
    else:
        if max_c == 1:
            A[i] = 0
            print(max(A))
        else:
            print(max_A)

Submission status: Runtime Error

Solution code:
n =int(input())
a = list()
 
for _ in range(n):
    a.append(int(input()))
 
b = sorted(a)
 
for i in range(n):
    if a[i] == max(a):
        print(b[-2]) 
    else:
        print(max(a))

Submission status: Runtime Error

Solution code:
a=int(input())
b=[int(input()) for i in range(a)]
m=max(b) 
for  i in range(0,a,1):
    if b[i]==m:
        c=b.copy()
        c[i]=0
        print(max(c))
    else:
        print (m)

Submission status: Runtime Error

Solution code:
a

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,d = input().split()
n = int(n)
d = int(d)
t = 2d + 1
     
if n % t == 0:
	ans = n/t
else:
	ans = n/t
    ans = ans + 1

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
"""
author : halo2halo
date : 13,Nov,2019
"""

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

print(3*int(read()**2))

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(int,input().split(), for _ in range(0,n))
x=max(a)
y=a.index(x)
del a[y]
z=max(a)

for i in range(0,n):
  if i!=y:
    print(x)
  else:
    print(z)

Submission status: Runtime Error

Solution code:
import bisect

N=int(input())
A=[int(input()) for i in range(N)]
lst=[]
nowN=max(A)+1
i=0
while i<N:
    if nowN>=A[i]:
        nowN=A[i]
        lst.append([A[i]])
    else:
        lst2=[n[-1] for n in lst]
        if min(lst2)<A[i]:
            lst[lst2.index(min(lst2))].append(A[i])
            """for n in range(len(lst2)):
                if lst2[n]<A[i]:
                    lst[n].append(A[i])
                    break"""
        else:
            lst.append([A[i]])
    i+=1
print(len(lst))

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]

max_A = sorted(A)[-1]
second_A = sorted(A)[-2]

for n in range(N):
    if A[n] != max_A:
        print(max_A)
    else:
        print(second_A)

Submission status: Runtime Error

Solution code:
x,a = map(int,input().split())
if x < a:
  print(0)
else:
  print(10)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = [input() for _ in range(N)]



m = max(A)
sec = 0
for k in range(0, len(A)):
  if(int(A[k]) == int(m)):
    for j in range(0, len(A)):
     if(j != k and sec < int(A[j])):
      sec = int(A[j])
    m = sec

  print(m)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [input() for _ in range(N)]



m = max(A)
#print(m)
sec = 0
for k in range(0, len(A)):
  if(int(A[k]) == int(m)):
 #   print("aaa: " + str(A[k]))
    for j in range(0, len(A)):
     if(j != k and sec < int(A[j])):
      sec = int(A[j])
    m = sec

  print(m)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [input() for _ in range(N)]



m = max(A)
#print(m)
sec = 0
for k in range(0, len(A)):
  if(int(A[k]) == int(m)):
 #   print("aaa: " + str(A[k]))
    for j in range(0, len(A)):
      if(sec < int(A[j]) and j != k):
        sec = int(A[j])
    m = sec
  print(m)

Submission status: Runtime Error

Solution code:
object Main extends App {
  val r = scala.io.StdIn.readInt
  println(r * r * 3)
}

Submission status: Runtime Error

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

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

# a = [1, 0, 0]
# N = 3

# a = [0, 0, 0, 0, 0]
# N = 5

# a = [1, 1]
# N = 2

b = [None for _ in range(N)]

def last_index(lst, val):
    return len(lst) - 1 - lst[::-1].index(val)


for i in range(N - 1, 0, -1):
    b[i] = sum(a[::i][1:]) % 2

b[0] = sum(a) % 2

s = sum(b)
print(s)
if s != 0:
    print(*b[:last_index(b, 1) + 1])

Submission status: Runtime Error

Solution code:
import math

N, D = map(int, input().split())

print(math.ceil(N / (D * 2 + 1)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:



n = input()
print(3*n*n)

Submission status: Runtime Error

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


n = input()
print(3*n*n)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(N//(2*D+1)+1)

Submission status: Runtime Error

Solution code:
print(3 * pow(int(input(), 2)))