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

Solution code:
SEQUENCE_LEN_MIN = 2
SEQUENCE_LEN_MAX = 200000
NUMERIC_MIN = 1
NUMERIC_MAX = 200000
 
 
class NumericInfo:
    def __init__(self):
        self.index = - 1
        self.value = NUMERIC_MIN - 1
 
    def update(self, idx, val):
        self.index = idx
        self.value = val
 
    def copy(self, info):
        self.update(info.index, info.value)
 
 
class SequenceProcessor:
    def __init__(self, sequence):
        self.sequence_length = len(sequence)
        self.first_largest_num_info = NumericInfo()
        self.second_largest_num_info = NumericInfo()
        self._process(sequence)
 
    def _process(self, sequence):
        for i, num in enumerate(sequence):
            if self.first_largest_num_info.value < num:
                self.second_largest_num_info.copy(self.first_largest_num_info)
                self.first_largest_num_info.update(i, num)
            elif self.second_largest_num_info.value < num:
                self.second_largest_num_info.update(i, num)
 
    def _max_value(self, idx):
        if idx == self.first_largest_num_info.index:
            return self.second_largest_num_info.value
        else:
            return self.first_largest_num_info.value
 
    def all_max_value(self):
        for i in range(self.sequence_length):
            yield self._max_value(i)
 
 
def _validate_sequence_length(s):
    r = int(s)
 
 
def get_sequence_length_from_stdin():
    s = input()
    s = s.strip()
    return int(s)
 
 
def _validate_numeric(s):
    r = int(s)
 
 
def get_sequence_from_stdin(length):
    result = []
    for i in range(1, length+1):
        while True:
            n = input()
            try:
                result.append(int(n))
                break
            except ValueError:
                continue
    return result
 
 
def main():
    seq_len = get_sequence_length_from_stdin()
    sequence = get_sequence_from_stdin(seq_len)
    seq_processor = SequenceProcessor(sequence)
    for num in seq_processor.all_max_value():
        print(num)
 
 
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:

SEQUENCE_LEN_MIN = 2
SEQUENCE_LEN_MAX = 200000
NUMERIC_MIN = 1
NUMERIC_MAX = 200000
 
 
class NumericInfo:
    """数列中の値とその値のインデックスを管理する"""
    def __init__(self):
        # 初期状態は言語仕様・制約上入力されない値を指定する
        self.index = - 1
        self.value = NUMERIC_MIN - 1
 
    def update(self, idx, val):
        self.index = idx
        self.value = val
 
    def copy(self, info):
        self.update(info.index, info.value)
 
 
class SequenceProcessor:
    def __init__(self, sequence):
        self.sequence_length = len(sequence)
        self.first_largest_num_info = NumericInfo()
        self.second_largest_num_info = NumericInfo()
        self._process(sequence)
 
    def _process(self, sequence):
        """引数で渡される数列をもとに、後の処理で使うインスタンス変数を初期化する
            sequence_length (int): 配列の個数
            first_largest_num_info (NumericInfo): 最大値のインデックスと値
            second_largest_num_info (NumericInfo): 2番目に大きな値のインデックスと値
 
        Args:
            sequence (List[int]): 数列
        """
        for i, num in enumerate(sequence):
            if self.first_largest_num_info.value < num:
                self.second_largest_num_info.copy(self.first_largest_num_info)
                self.first_largest_num_info.update(i, num)
            elif self.second_largest_num_info.value < num:
                self.second_largest_num_info.update(i, num)
 
    def _max_value(self, idx):
        """指定されたインデックスの値を除く、数列中の最大値を求める
 
        Args:
            idx (int): 指定されたインデックス
        """
        if idx == self.first_largest_num_info.index:
            return self.second_largest_num_info.value
        else:
            return self.first_largest_num_info.value
 
    def all_max_value(self):
        """数列全てのインデックスに対して、インデックスの値を除く、数列中の最大値を求める
        """
        for i in range(self.sequence_length):
            yield self._max_value(i)
 
 
def _validate_sequence_length(s):
    """入力値（数列の個数）が制約通りか検証する
 
    Args:
        s (str): 数列の個数が制約通りか検証する文字列
            制約1. 整数であること
            制約2. 2以上200000以下であること
    Raises:
        ValueError: 制約外の値が渡された場合
   """
    if not s.isdigit():
        raise ValueError("数列の個数の入力値が整数ではありません")
    r = int(s)
    if not SEQUENCE_LEN_MIN <= r <= SEQUENCE_LEN_MAX:
        raise ValueError(
            f"数列の個数は{SEQUENCE_LEN_MIN}から"
            f"{SEQUENCE_LEN_MAX}の間で指定してください")
 
 
def get_sequence_length_from_stdin():
    """数列の個数を標準入力から取得する
 
    Returns:
        int: 数列の個数
    """
    s = input()
    s = s.strip()
    _validate_sequence_length(s)
    return int(s)
 
 
def _validate_numeric(s):
    """入力値（数値）が制約通りか検証する
 
    Args:
        s (str): 数値が制約通りか検証する文字列
            制約1. 整数であること
            制約2. 1以上200000以下であること
    Raises:
        ValueError: 制約外の値が渡された場合
   """
    if not s.isdigit():
        raise ValueError("数値の入力値が整数ではありません")
    r = int(s)
    if not NUMERIC_MIN <= r <= NUMERIC_MAX:
        raise ValueError(
            f"数値は{NUMERIC_MIN}から{NUMERIC_MAX}の間で指定してください")
 
 
def get_sequence_from_stdin(length):
    """標準入力から数列を作成する
 
    Args:
        length (int): 作成する数列の個数
 
    Returns:
        List[int]: 数列
   """
    result = []
    for i in range(1, length+1):
        while True:
            n = input()
            try:
                _validate_numeric(n)
                result.append(int(n))
                break
            except ValueError:
                print("入力値に誤りがあります。再入力してください。")
                continue
    return result
 
 
def main():
    seq_len = get_sequence_length_from_stdin()
    sequence = get_sequence_from_stdin(seq_len)
    seq_processor = SequenceProcessor(sequence)
    for num in seq_processor.all_max_value():
        print(num)
 
 
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N,D = list(map(int,input().split()))
human = 1
hani = 2*D+1
while hani < N:
    hani = hani + (2*D+1)
    human +=1
    
print(human)

Submission status: Runtime Error

Solution code:
N,D = list(map(int,input().split()))
human = 1
hani = 2*D+1
haniwhile hani < N:
    hani = hani + (2*D+1)
    human +=1
    
print(human) = kanshi

Submission status: Runtime Error

Solution code:
def dd():
    r=int(input("r="));
    d=3*c*c;
    print(d);
def main():
    dd();
main();

Submission status: Runtime Error

Solution code:
import copy
n=int(input())
a=[int(input()) for i in range(n)]
for i in range(n):
  temp=copy.deepcopy(a)
  temp.pop(i)
  print(max(temp))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, [0]*input_num
    count = [1 for i in range(input_num) if a_i[0] == a_i[i]]
    frag = False if sum(count) >= 2 else True
    value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)] if frag == True else [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()

Submission status: Runtime Error

Solution code:
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, [0]*input_num
    count = [1 for i in range(input_num) if a_i[0] == a_i[i]]
    frag = False if sum(count) >= 2 else True
    value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)] if frag == True else [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()

Submission status: Runtime Error

Solution code:
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, 0
    for i in range(input_num):
        if a_i[0] == a_i[i]:
            count += 1
    if count == input_num:
         frag = False
    if frag == True:
        value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)]
    else:
        value = [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()

Submission status: Runtime Error

Solution code:
N,D=map(int,input().split());print(-(-N//(2*D+1)))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B= map(int,input('please enter number').split())
s = A - B
if s % 2 == 0:
	print(abs(s/2)+min(A, B))
else:
	print('IMPOSSIBLE')

Submission status: Runtime Error

Solution code:
r=input()

print(3*r^2)

Submission status: Runtime Error

Solution code:
m=3*r*r
prnit(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
import math
from copy import deepcopy
from collections import deque
sys.setrecursionlimit(20000000)


def main():
    N = int(input())
    nums = [int(input()) for _ in range(N)]

    for i in range(len(nums)):
        tmp = nums[i]
        nums[i] = 0
    
        print(max(nums))
        
        nums[i] = tmp


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n=int(input())
listA=(input().split())
list1=[0 for i in range(n)]
list2=[]
numOfBox=0
#考えるべきボールの数の合計
for i in range(n,0,-1):#n,n-1,...1って感じです
    #print(i)
    count=1
    s=0
    while i*count<=n:
        s+=list1[i*count-1]
        count+=1
    #print(s)
    if s%2!=int(listA[i-1]):
        list1[i-1]+=1
        numOfBox+=1
        list2.append(i)
#print(list1)
print(numOfBox)
for i in range(len(list2)):
    print(list2[i],end=" ")

Submission status: Runtime Error

Solution code:
n = int(raw_input())
a = []
for i in range(n):
    a.append(int(raw_input()))

b = [ 0 if i == max(a) else i for i in a ]
if max(b) == 0:
    b = [ max(a) if i == max(a) else i for i in a ]

print([ max(b) if i == max(a) else max(a) for i in a ])

Submission status: Runtime Error

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
li = list(int(stdin.readline().rstrip()) for _ in range(n))
li_to = sorted(li)
one = li_to[-1]
two = li_to[-2]
for i in range(n):
    if max(li) == li[i]:
        print(two)
    else:
        print(one)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, d = map(int, input().split())
i = (d * 2) + 1
if n % i == 0 :
  print(n / i)
else :
  print((n // i) + 1)

Submission status: Runtime Error

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

newList = sorted(A,reverse=True)

for i in A:
    if newList[0] == i:
        print(newList[1])
    else:
        print(newList[0])

Submission status: Runtime Error

Solution code:
import math
n,d=map(int,input().split())
print(math.ceil(n/(2*d+1)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#B - Golden Apple(ABC134)
X=list(map(int, input().split()))
for i in range(X[0]+1):
    if X[0]<=(X[1]*2+1)*i:
        print(i)
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
c=(a//(2b+1))+1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input().split())

print(3*a*a)

Submission status: Runtime Error

Solution code:
def main():
    a = int(input())
    lists= [int(input()) for _ in range(a)]
 
    temp = lists.copy()
    first = max(temp)
    temp.remove(first)
    second = max(temp)
 
    for i in range(a):
        if lists[i] == first:
            print(second)
        else:
            print(first)
 
if __name__ == '__main__' :
    main()

Submission status: Runtime Error

Solution code:
# coding:utf-8
def main():
    a = int(input())
    lists = []
    lists= [int(input()) for _ in range(N)]

    temp = lists.copy()

    for i in range(a):
        lists = temp.copy()
        lists.pop(i)
        ans = max(lists)
        print(ans)

if __name__ == '__main__' :
    main()

Submission status: Runtime Error

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

print(3*a**2)

Submission status: Runtime Error

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

print(3*a*a)

Submission status: Runtime Error

Solution code:
N = int(input())

input_list = []
tmplist = []

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

for i in input_list:
  tmplist = input_list[:]
  tmplist.remove(i)
  print(max(tmplist))

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(int(input()) for i in range(N))
ans = A[0]
for i in range(N):
    for n in range(i):
        if ans < A[i]:
            ans = A[i]
    for n in range(i+1,N):
        if ans < A[i]:
            ans = A[i]
    print(ans)
    ans = A[0]

Submission status: Runtime Error

Solution code:
def multiple_factors(i, N):
  factors = []
  factors.append(int(1*i))
  for index in range(1, N//i):
    factors.append(int(index*i))
  return factors
  
def assign_ball(factors, blist, ai, b_add_index):
  sum_b = 0
  for index in range(len(factors)-1, 0, -1):
    sum_b += blist[factors[index]-1]
  
  if ai != sum_b%2:
    blist[factors[0]-1] =1
    b_add_index.append(str(factors[index]))
  return blist, b_add_index

      
N = int(input())
alist = list(map(int, input().split()))
blist = [0 for i in range(N)]
M = 0
b_add_index = []
for i in range(N-1,-1, -1):
  factors = multiple_factors(i+1, N)
  blist, b_add_index = assign_ball(factors, blist, alist[i], b_add_index)

if sum(blist)%2 != alist[0]:
  print(-1)
else:
  print(len(b_add_index))
  print(" ".join(b_add_index))

Submission status: Runtime Error

Solution code:
r=input()

print(3*int(r)*int(r)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
r = map(int, input().split())
b = 3*r*r
print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, D = map(int, input().split())
print(int(N//(2*D+1.001) + 1))

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

N = int(input())
A = list(map(int, input().split()))
ANS = [0]*len(A)
ansList = []
for i in range(len(A),0,-1):
    if(ANS[i-1]%2!=A[i-1]):
        tList = make_divisors(i)
        for j in tList:
            ANS[j-1]+=1
        ansList.append(i)
print(len(ansList))

for i in ansList:
    print(i, end=" ")

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

N = int(input())
A = list(map(int, input().split()))
ANS = [0]*len(A)
sum=0
ansList = []
for i in range(len(A),0,-1):
    if(ANS[i-1]%2!=A[i-1]):
        tList = make_divisors(i)
        for j in tList:
            ANS[j-1]+=1
        ansList.append(i)
print(len(ansList))
for i in ansList:
    print(i, end=" ")

Submission status: Runtime Error

Solution code:
N = int(input())
As = []
for i in range(N):
    As.append(int(input())
for j in range(N):
    instAs = As
    instAs.pop(j)
    print(max(instAs)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
for i, num in enumerate(A):
    AA = [x for j, x in enumerate(A) if i != j]
    print(max(AA))

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
print("---")
for i, num in enumerate(A):
    AA = [x for j, x in enumerate(A) if i != j]
    print(max(AA))

Submission status: Runtime Error

Solution code:
# B - Golden Apple

from math import ceil 
N, D = map(int, input().split())
print(ceil(N/(2*D+1)))

Submission status: Runtime Error

Solution code:
N, D = map(int, input().split())
print((N+2*D)//(2*D+1))

Submission status: Runtime Error

Solution code:
# B - Golden Apple

N, D = map(int, input().split())
# print(int((N+2*D)/(2*D+1)))
print((N+2*D)//(2*D+1))

Submission status: Runtime Error

Solution code:
# B - Golden Apple

N, D = map(int, input().split())
print(int((N+2*D)/(2*D+1)))

Submission status: Runtime Error

Solution code:
r = int(input())

print(3r^2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
A=list(map(int, input().split()))
box=[0]*n
for i in range(n-1,-1,-1):
    if n//(i+1)<=1 and A[i]==1:
        box[i]=1
    elif n//(i+1)<=1 and A[i]==0:
        pass
    elif n//(i+1)>1:
        if A[i]==sum(box[2*(i+1)-1::(i+1)])%2:
            pass
        elif A[i]!=sum(box[2*(i+1)-1::(i+1)])%2:
            box[i]=1
ans=""
for i in range(n):
    if box[i]==1:
        ans+=str(A[i])+" "
if sum(box)%2==A[0]:
    print(sum(box))
    print(ans)
else: print("-1")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
echo(r^2*3)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print (2a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
n, d = map(int, input().split())
 
print(math.ceil(n / (d * 2 + 1)), end=" ")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
r = 0

s = 3*r*r
printf(s)

Submission status: Runtime Error

Solution code:
N = int(input())
B = [10 ** 9 + 1]
for i in range(N):
  A = int(input())
  flag = True
  for j in range(len(B)):
    if A > B[j]:
      B[j] = A
      flag = False
      break
  if flag:
    B.append(A)
print(len(B) - 1)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
A = [int(input()) for i in range(N)]
temp = 0

for i in range(N):
	if A[i] != max(A):
		print(max(A))
	else
		temp = A[i]
		del A[i]
		print(max(A))
		A.insert(i,temp)
		temp = 0

Submission status: Runtime Error

Solution code:
N, D = map(int, input().split())
a = N / (2 * D + 1)
if N % (2 * D + 1) == 0:
    print(int(a))
else:
    print(int(a) + 1)

Submission status: Runtime Error

Solution code:
N,D=map(int,input().split())
a=0
while a*((2*D)+1)<N:
    a=a+1
print(a)

Submission status: Runtime Error

Solution code:
r = int(input())

print(3r*r)

Submission status: Runtime Error

Solution code:
n=int(input())
l=list(map(int,input().split()))
b=[]
emp=[0]*n
ans=0
for i in range(n)[::-1]:
  c=n//(i+1)
  s=0
  while (c+1)*(i+1)<=n:
    s+=emp[(c+1)*(i+1)-1]
    c+=1
    s%=2
  if l[i]!=s:
    b.append(str(i+1))
    ans+=1
    emp[i]=1
print(ans)
print(" ".join(b))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import copy
N = int(input())
a = [input() for i in range(N)]
b = copy.deepcopy(a)
for i in b:
    del b[i]
    print(max(b))
    b = copy.deepcopy(a)

Submission status: Runtime Error

Solution code:
n,d=list(map(int, input().split()))
 
d1=d*2+1
print((n+d1-1)/d1)

Submission status: Runtime Error

Solution code:
value=input().split()

print(3*value*value)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
3    r = int(raw_input())
4
5    print 3*r*r

Submission status: Runtime Error

Solution code:
r = input()

menseki = 3 * r * r
print(menseki)

Submission status: Runtime Error

Solution code:
inputs = [int(x) for x in input().split()]

N = inputs[0]
D = inputs[1]
answer = 0
if N > (D*2) + 1:
  check = N % ((D*2) + 1)
  answer = N / ((D*2) + 1) 
  answer = int(answer)
  if check != 0:
    answer += 1
  
else:
  answer = 1
  
print(answer)

Submission status: Runtime Error

Solution code:
a = int(input())
print("{}".format(3*a*a)

Submission status: Runtime Error

Solution code:
a = int(input())
print("{}".Format(3*a*a))

Submission status: Runtime Error

Solution code:
N = int(input())
a = list(map(int, input().split()))
ans = []
for i in range(N):
	if sum(x % (N - i) for x in ans) != a[N - 1 - i]:
		ans.append(N - i)
print(len(ans))
Ans = [str(x) for x in ans]
print(' '.join(Ans))

Submission status: Runtime Error

Solution code:
N = int(input())
a = [int(input()) for i in range(N)]
s = sorted(a,reverse=True)
for i in range(N):
  if s[0]!=a[i]:
    print(s[0])
  else:
    print(s[1])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
i = input()
out = 3*i*i
print(out)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(N):
    a = 0
    b = 0
    if (i != 0):
        a = max(num_array[0:i])
    if (i+1 < N):
        b = max(num_array[i+1:N])
    if a > b: 
        print(a)
    else: 
        print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
A = [int(input()) for i in range(n)]
  
for i in range(n):
  Ai = A[:]
  Ai.pop(i)
  print(max(Ai))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
D = 3 * (r**2)

Submission status: Runtime Error

Solution code:
x=input();
print(3*x*x);

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = [0 for _ in range(len(a) + 1)]
for i in range(len(a)):
    ri = len(a) - i
    if sum(b[::ri]) % 2 != a[ri - 1]:
        b[ri] = a[ri - 1]
b = b[1:]
print(len(str(b).split("1"))-1)
for i in range(len(b)):
    if b[i]:
        print(i + 1, end="")
        print(" ", end="")

Submission status: Runtime Error

Solution code:
N=int(input())
a=[0]*N
maxim=[0]*N
for i in range(N):
    a[i]=int(input())
maxim=sorted(list(a), reverse=True)
for k in range(N):
    if a[k]!=maxim[0]:
        print(maxim[0])
    else:
        print(maxim[1])

Submission status: Runtime Error

Solution code:
N=int(input())
a=[0]*(N)
maxim=[0]*(N)
for i in range(N):
    a[i]=int(input())
maxim=sorted(list(a), reverse=True)
for k in range(N):
    if a[k]!=maxim[0]:
        print(maxim[0])
    else:
        print(maxim[1])

Submission status: Runtime Error

Solution code:
N,D = map(int,input().split())
a = N//(2*D+1)
if N%(2*D+1) == 0:
	print(a)
else:
 	print(a+1)

Submission status: Runtime Error

Solution code:
N,D = map(int,input().split())
a = (N-1)/(2*D)
if (N-1)%(2*D) == 0:
	print(a)
else:
 	print((N-1)//(2*D+1))

Submission status: Runtime Error

Solution code:
n = int(input())
d = int(input())
ans = n // (2*d + 1)
if n % (2*d + 1) == 0:
  print(ans)
else:
  print(ans+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,d = (int(i) for i in input().split())

d = d*2 +1
q = n//d
mod = n % d
ans = q
if mod != 0:
    ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
N,D = = map(int, input().split())
print((N-1)//(2*D+1)+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
D = 3 * r**2

Submission status: Runtime Error

Solution code:
N,D=map(int, input().split())
b2=D*2+1
print(-(-N//b2))

Submission status: Runtime Error

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

if N % (2*D + 1) == 0:
  print(N // (2*D + 1))
else:
  print(N // (2*D + 1) + 1)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split(' '))
print(-(-a//(1+2*b)))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(-(-a//(1+2*b)))

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
dp = {}

dp[(0, 0, 0)] = 1

def perm(i, j, k):
  if (i, j, k) in dp:
    return dp[(i, j, k)]
  
  if i < 0 or j < 0 or k < 0 or i < j:
    return 0
  
  dp[(i, j, k)] = ((j+j+1)*perm(i-1, j, k-2*j)\
                + (j+1)*(j+1)*perm(i-1, j+1, k-2*j)\
                +  1*perm(i-1, j-1, k-2*j))%int(10e9+7)
  return dp[(i, j, k)]

print(perm(n, 0, k))

Submission status: Runtime Error

Solution code:
N = int(input())
a = []
a = list(map(int,input().split()))
 
b = [0]*N
for i in reversed(range(N)):
    j = i + 1
    buf = b[i::j]
    if (sum(buf) % 2) != a[i]:
        b[i] = 1
print(sum(b))
bb = [i+1 for i in range(N) if b[i] == 1]
if sum(b) != 0:
    print(' '.join(map(str, bb)))

Submission status: Runtime Error

Solution code:

print(str(3r**2))

Submission status: Runtime Error

Solution code:
N = int(input())
a = map(int, input().split())
a = [0] + list(a)
b = [0] * (N+1)
result_str = ''

for i in range(N, 0, -1):
  i_sum = sum(b[i::i])
  if i_sum % 2 != a[i]:
    b[i] = 1
    result_str = '{} '.format(i) + result_str

print(sum(b))
print(result_str[:-1])

Submission status: Runtime Error

Solution code:

r = int(input())
print(fun(r))

def fun(r):
  a = 3 * r**2
  return a

Submission status: Runtime Error

Solution code:
import bisect

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

ans = 1
X = [-A[0]]
for i in range(1,N):
    if -X[ans-1] >= A[i]:
        X.append(-A[i])
        ans += 1
    else:
        pos = bisect.bisect_left(X,-A[i])
        X[pos] = -A[i]

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
i=0
b=[]
pos=0
maxi=0
while(i<n):
  k=int(input())
  b.append(k)
  if(k>maxi):
    pos=i
    maxi=k
  i+=1
b.sort()
ns=b[n-2]
i=0
while(i<n):
  if(i==pos):
  	print(ns)
  else:
    print(b[n-1])
  i+=1

Submission status: Runtime Error

Solution code:
n, d = map(int, input().split())
a = n // (2*d + 1) + 1
print(a)

Submission status: Runtime Error

Solution code:
a = int(input())

pritn(a**3 * 2)

Submission status: Runtime Error

Solution code:
n=int(input());
num_list=[];
for i in range(n):
    num_list.append(int(input()));
    m=max(num_list)
for j in range(n):
    if(num_list[j]==m):
        num_list[j]=0;
        print(max(num_list))
    else:
        print(m);

Submission status: Runtime Error

Solution code:
n=int(input());
num_list=[];
for i in range(n):
    num_list.append(int(input()));
    m=max(num_list)
for j in range(n):
    if(num_list[j]==m):
        num_list[j]=0;
        print(max(num_list))
    print(m);

Submission status: Runtime Error

Solution code:
n=int(input());
num_list=[];
for i in range(n):
    num_list.append(int(input()));
    m=max(num_list)
for j in range(n):
    if(num_list[j]==m):
        print(max(num_list))
    print(m);

Submission status: Runtime Error

Solution code:
n=int(input());
num_list=[];
for i in range(n):
    num_list.append(int(input()));
    m=max(num_list)
for j in range(n):
    if(num_list[j]==m):
        print(m=max(num_list))
    print(m);

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
3r^2

Submission status: Runtime Error

Solution code:
N = int(input())
a = map(int, input().split())
a = [0] + list(a)
b = [0 for i in range(N+1)]
result_str = ''

for i in range(N, 0, -1):
  i_sum = 0
  for j in range(1, N // i + 1):
    i_sum += b[j*i]
  if i_sum % 2 != a[i]:
    b[i] = 1
    result_str = '{}　'.format(i) + result_str

print(sum(b))
if sum(b) != 0:
    print(result_str[:-1])