ZhenlongDai/ACPR huggingface dataset:
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(sorted(list(map(int,input().split()))))
print(sum(a[n:2*n]))

Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100101 1000000000 1101000111 1000000011 1000110001 0010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10332622133


Actual output:
10021545312


Fixed submission (verdict: Accepted):
n = int(input())
a = list(sorted(list(map(int,input().split())),reverse = True))
print(sum(a[1:n*2:2]))

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a_li = list(map(int,input().split()))
a_li.sort()
ans = 0
for i in range(n):
    ans += a_li[3*n-1-n-i]
print(ans)

Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000100110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10322534213


Actual output:
10012553323


Fixed submission (verdict: Accepted):
n = int(input())
a_li = list(map(int,input().split()))
a_li.sort()
ans = 0
for i in range(1,n+1):
    ans += a_li[3*n-1-(i*2-1)]
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = sorted(list(map(int, input().split())))

print(sum(a[N:2 * N]))


Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000000110 1010000001 1000110000 1000011000 1011000000 1101100011 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10322435214


Actual output:
10012454214


Fixed submission (verdict: Accepted):
N = int(input())
a = sorted(list(map(int, input().split())))

print(sum(a[N::2]))

Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
a = list(map(int,input().split()))
a.sort()
print(sum(a[N:2*N]))

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 0100000110 1010000001 1100110000 1001011000 1011000000 1101100011 0100110000 0011110101 1000000000 1001000111 1000000001 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1000000100

Expected output:
10322336224


Actual output:
10013345214


Fixed submission (verdict: Accepted):
N = int(input())
a = list(map(int,input().split()))
a.sort()
b = a[N:]
print(sum(b[::2]))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

list = input().split(" ")
num_list = []

for num in list:
    num_list.append(int(num))

num_list.sort(reverse=True)

total = 0
for i in range(N,2*N):
    total += num_list[i]

print(total)


Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 1000001001 1000001000 1000100000 1000000100 1000100000 1010100000 1100101110 1010000000 1000010000 1000011000 1010000000 1001100000 0100000000 0001100100 1000000000 1101000000 1000000001 1000010000 1010000000 1100000000 1001000100 1000001000 1100000001 1000000000 1000000000 1110000100

Expected output:
10322222111


Actual output:
10002433101


Fixed submission (verdict: Accepted):
N = int(input())

list = input().split(" ")
num_list = []

for num in list:
    num_list.append(int(num))

num_list.sort(reverse=True)
total = 0
count = 0
for i in range(N*3):
    if i % 2 == 1 and count < N:
        total += num_list[i]
        count += 1
        
print(total)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = sorted(list(map(int, input().split())))
ans = 0
for i in range(n, n*3, 2):
    print(i)
    ans += a[i]
print(ans)

Failing test case input:
10
1000000000 1000100000 1100100001 0000001000 0000000000 1000000000 1000000000 0100000100 1000100000 1010100000 1000101110 1010000000 1000010000 1000011000 1010000000 1000000000 0100000000 0001100100 1000000000 1100000000 1000000001 1000010000 1010000000 1100100000 1001000100 1000000000 1000000001 1000000000 1000000000 1110000100

Expected output:
10220311112


Actual output:
10
12
14
16
18
20
22
24
26
28
10220311112


Fixed submission (verdict: Accepted):
n = int(input())
a = sorted(list(map(int, input().split())))
ans = 0
for i in range(n, n*3, 2):
    ans += a[i]
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import deque

if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))

    a.sort()
    deq = deque(a)
    for i in range(n):
        deq.pop()
        deq.popleft()

    ans = 0
    for d in deq:
        ans += d

    print(ans)


Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101100011 0100110000 0111110101 1000000000 1001000111 1000000001 1000110001 0010000110 0100000001 1001011100 1000011000 1110001001 1000001000 1000000000 1000000100

Expected output:
10233633212


Actual output:
10003346313


Fixed submission (verdict: Accepted):
from collections import deque


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

    a.sort(reverse=True)
    ans = 0
    for i in range(N):
        ans += a[2*i + 1]

    print(ans)


if __name__ == "__main__":
    main()
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
print(sum(sorted([int(i) for i in input().split()])[n:2*n]))

Failing test case input:
10
1000000000 1000100000 0000000001 0000000000 0000000000 1000000000 1000000000 0000000000 1000100000 1010000000 1000000010 1010000000 1000010000 1000011000 1000000000 1000000000 1100000000 0001100100 1000000000 1100000001 1000000001 1000000000 1010000000 1100100000 1001000000 1000000000 1000000001 1000000000 1000000000 1110000000

Expected output:
10211210001


Actual output:
10000021012


Fixed submission (verdict: Accepted):
n=int(input())
print(sum(sorted([int(i) for i in input().split()])[-2:n-1:-2]))

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N=int(input())
a_list=list(map(int,input().split()))
a_list=sorted(a_list)[::-1]
power=[]
print(a_list)
for i in range(N):
    power.append(a_list[2*i+1])
print(sum(power))

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1100000110 1010000001 1100110000 1000011000 1011000000 1101100011 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10332442214


Actual output:
[1101100011, 1100110011, 1100110000, 1100001001, 1100000110, 1100000001, 1100000000, 1011000000, 1010100000, 1010100000, 1010001100, 1010000100, 1010000001, 1001010100, 1001000111, 1000110001, 1000101001, 1000100000, 1000011000, 1000011000, 1000001000, 1000001000, 1000000011, 1000000000, 1000000000, 100110000, 100001000, 10000110, 1100101, 100100]
10332442214


Fixed submission (verdict: Accepted):
N=int(input())
a_list=list(map(int,input().split()))
a_list.sort(reverse=True)
power=[]
for i in range(N):
    power.append(a_list[2*i+1])
print(sum(power))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
array = [int(i) for i in input().split()]

array.sort()
ans = 0



for i in range(n):
  ans = ans + array[2*i+1]
  
print(ans)

Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10322524333


Actual output:
8112324213


Fixed submission (verdict: Accepted):
n = int(input())
array = [int(i) for i in input().split()]

list.sort(array, reverse=True)
ans = 0



for i in range(n):
  ans = ans + array[2*i+1]
  
print(ans)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a = list(map(int, input().split()))
a.sort()
print(sum(a[n:n*2]))

Failing test case input:
10
1100000000 1000100100 1100100011 0100001000 1000001001 1000001000 1010100000 1000001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1101100010 0100110000 0001100100 1000000000 1101000111 1000000011 1000110001 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331423323


Actual output:
10021543311


Fixed submission (verdict: Accepted):
n=int(input())
a = list(map(int, input().split()))
a.sort()
print(sum(a[n::2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
for i in range(N):
  ans += L[N+i]
print(ans)

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010001100 1000000000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101001111 1010100101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001010 1000001000 1000000000 1000000100

Expected output:
10333325334


Actual output:
10022347312


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int,input().split()))
L.sort()
L.reverse()
ans = 0
for i in range(N):
  ans += L[2*i+1]
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
a.sort(reverse=True)
print(sum(a[1:n*n:2]))

Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000001001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100100 1000000000 1101000111 1000000011 1000110001 0010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331325324


Actual output:
12441536534


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
a.sort(reverse=True)
print(sum(a[1:n*2:2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))
A.sort()
print(sum(A[N:-N]))

Failing test case input:
2
0 -1 26 18 3 0

Expected output:
18


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
print(sum(A[1::2][:N]))
Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
total = 0
for i in range(n, n * 2):
    total += a[i]
print(total)

Failing test case input:
10
1000000000 1000100000 0100100001 0000001000 0000000000 1000000000 1000000000 0100000100 1000100000 1010000000 1000100110 1010000000 1000010000 1000011000 1010000000 1000000000 0100000000 0001100100 1000000000 1100000000 1000000001 1000010000 1010000000 1100100000 1001000100 1000000000 1000000001 1000000000 1000000000 1110000100

Expected output:
10121221101


Actual output:
10000131002


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
a.sort()
total = 0
for i in range(n, n * 3, 2):
    total += a[i]
print(total)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
list_a  = list(map(int, input().split()))

list_a.sort()

sum_of_team = sum(list_a[N:2*N])

print(sum_of_team)

Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 1000000001 1000001000 1000000000 1100000100 1000100000 1010100000 1000101110 1010000000 1000010000 1000011000 1010000000 1000000000 0100000000 0001100100 1000000000 1101000000 1000000001 1000010000 1010000000 1100100000 1001000100 1000001000 1000000001 1000000000 1000000000 1110000100

Expected output:
10222322101


Actual output:
10000334112


Fixed submission (verdict: Accepted):
N = int(input())
list_a  = list(map(int, input().split()))

list_a.sort()
print(sum(list_a[N::2]))

Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
an = list(map(int,input().split()))

lists = [[] for _ in range(N)]
while len(an) > 0:
    for k in range(N):
        lists[k].append(min(an))
        del an[an.index(min(an))]

sasa = 0
for j in range(N):
    sasa += lists[j][1]
print(sasa)

Failing test case input:
10
1100000000 1000100100 1100100011 0100001000 1000001001 1000001000 1010100000 1000001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1101100010 0100110000 0001100100 1000000000 1101000111 1000000011 1000110001 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331423323


Actual output:
10021543311


Fixed submission (verdict: Accepted):

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

lists = [[] for _ in range(N)]
an.sort(reverse=True)

for k in range(N):
    lists[k].append(an[2*k])
    lists[k].append(an[2*k+1])
                    
for i in range(N):
    lists[i].append(an[2*N-1+i])

sasa = 0
for j in range(N):
    sasa += lists[j][1]
print(sasa)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
L=list(map(int,input().split()))
L=sorted(L)
print(sum(L[N:2*N]))

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000000110 1010000001 1100110000 1000011000 1011000000 1101100011 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331325225


Actual output:
10022344314


Fixed submission (verdict: Accepted):
N=int(input())
L=list(map(int,input().split()))
L=sorted(L)
K=0
for i in range(N):
	K+=L[i*2+N]
print(K)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))

a.sort(reverse=True)

print(sum(a[n:2*n]),a)

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010001100 1000000000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101000111 1010100101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001000 1000001000 1000000000 1000000100

Expected output:
10333324334


Actual output:
10022347312 [1110001000, 1101000111, 1101000001, 1100110011, 1100110000, 1100000000, 1011100000, 1011000001, 1010100101, 1010100000, 1010100000, 1010001100, 1001011100, 1001011000, 1000110001, 1000101011, 1000011000, 1000001000, 1000001000, 1000000100, 1000000000, 1000000000, 1000000000, 111110101, 100110000, 100001000, 100000010, 100000001, 10000110, 100100]


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))

a.sort(reverse=True)
c = 0
for i in range(n):
    c += a[2*i + 1]

print(c)

Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
arr = list(map(int, input().split()))
arrr = arr.sort(reverse=True)
ans = sum(arr[n:n + n])
print(ans)

Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10322524333


Actual output:
10012544323


Fixed submission (verdict: Accepted):
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
arr = arr[n:]
arr2 = [arr[i] for i in range(len(arr)) if i % 2 == 0]
ans = sum(arr2)
print(ans)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
total_members = N*3
members = sorted(map(int, input().split()))
total = 0
for i in range(0, total_members, 3):
    total += members[i+1]
print (total)

Failing test case input:
10
1000000000 1000100000 0000100001 0000001000 0000000000 1000000000 1000000000 0100000000 1000100000 1010000000 1000100010 1010000000 1000010000 1000011000 1010000000 1000000000 1100000000 0001100100 1000000000 1100000000 1000000001 1000000000 1010000000 1100100000 1001000100 1000000000 1000000001 1000000000 1000000000 1110000000

Expected output:
10220310011


Actual output:
8220211000


Fixed submission (verdict: Accepted):
N = int(input())
total_members = N*3
members = sorted(map(int, input().split()), reverse=True)
total = 0
for i in range(0, N):
    total += members[i * 2 + 1]
print (total)

Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
lis = sorted(list(map(int, input().split())))
ans = 0

for i in range(N, 0, -1):
    ans += lis[i*2]

print(ans)

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1010000001 1100110000 1001011000 1011100000 1101100011 0100110000 0111110101 1000000000 1001000111 1000000001 1000110001 0010000110 0100000001 1001011100 1000011000 1110001001 1000001000 1000000000 1000000100

Expected output:
10233632113


Actual output:
7322333204


Fixed submission (verdict: Accepted):
N = int(input())
lis = list(map(int, input().split()))
lis.sort(reverse=True)
lis = lis[1::2]

ans = 0

for i in range(N):
    ans += lis[i]

print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input())


A_list = list(map(int, input().split()))

A_list = list(reversed(sorted(A_list)))
print(A_list)



ans  = 0
for i in range(1,2*N,2):
  
  
  ans = ans + A_list[i]
print(ans)

Failing test case input:
2
5 2 8 5 1 5

Expected output:
10

Actual output:
[8, 5, 5, 5, 2, 1]
10


Fixed submission (verdict: Accepted):

N = int(input())


A_list = list(map(int, input().split()))

A_list = list(reversed(sorted(A_list)))




ans  = 0
for i in range(1,2*N,2):
  ans = ans + A_list[i]
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
array = list(map(int, input().split()))

array = sorted(array, reverse=True)
s = n
e = 2 * n
print(sum(array[int(s):int(e)]))

Failing test case input:
10
1000000000 1000100100 1100100011 0000001000 1000001001 1000001000 1010100000 1000000100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1001100010 0100110000 0001100100 1000000000 1101000110 1000000011 1000010000 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10231413323


Actual output:
10002544321


Fixed submission (verdict: Accepted):
n = int(input())
array = list(map(int, input().split()))

array = sorted(array, reverse=True)
print(sum(array[1:2 * n:2]))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
l = input().split()
l.sort()
l = map(int, l)
l = list(l)
S = 0
for i in range(N):
    S += l[N + 2 * i]
print(l)
print(S) 

Failing test case input:
2
-2 1 3 6 -4 0

Expected output:
3


Actual output:
[-2, -4, 0, 1, 3, 6]
3


Fixed submission (verdict: Accepted):
N = int(input())
l = input().split()
l = map(int, l)
l = list(l)
l.sort()
S = 0
for i in range(N):
    S += l[N + 2 * i]
print(S)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
a.sort()

if n>=2:
    print(a[-2]+a[-4])
else:
    print(a[1])

Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100100 1000000000 1101000111 1000000011 1000110001 0010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331424323


Actual output:
2201001112


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()

a_li=a[1:2*n:2]
print(sum(a_li))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):




if __name__ == '__main__':
    n = int(input())
    a = sorted(list(map(int, input().split())), reverse=True)
    print(sum(a[n:2 * n]))


Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010001100 1000000000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101000111 1010000101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001000 1000001000 1000000000 1000000100

Expected output:
10333323335


Actual output:
10022247413


Fixed submission (verdict: Accepted):




if __name__ == '__main__':
    n = int(input())
    a = sorted(list(map(int, input().split())), reverse=True)
    print(sum(a[1:2 * n:2]))

Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
a = list(map(int, input().split()))

cnt = 0
a.sort(reverse=True)
print(a)

for i in range(1, 2*N, 2):
    cnt += a[i]

print(cnt)

Failing test case input:
10
1000000000 1000100000 0000000001 0000001000 0000000000 1000000000 1000000000 0000000000 1000100000 1010000000 1000000010 1010000000 1000010000 1000011000 1010000000 1000000000 1100000000 0001100100 1000000000 1100000001 1000000001 1000000000 1010000000 1100100000 1001000100 1000000000 1000000001 1000000000 1000000000 1110000000

Expected output:
10220211011


Actual output:
[1110000000, 1100100000, 1100000001, 1100000000, 1010000000, 1010000000, 1010000000, 1010000000, 1001000100, 1000100000, 1000100000, 1000011000, 1000010000, 1000000010, 1000000001, 1000000001, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1100100, 1000, 1, 0, 0]
10220211011


Fixed submission (verdict: Accepted):
N = int(input())
a = list(map(int, input().split()))

cnt = 0
a.sort(reverse=True)

for i in range(1, 2*N, 2):
    cnt += a[i]

print(cnt)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
a=sorted(a)
print(sum(a[n:n+n]))

Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 1000001001 1000001000 1000100000 1000000100 1000100000 1010100000 1100101110 1010000000 1000010000 1000011000 1010000000 1001100000 0100000000 0001100100 1000000000 1101000000 1000000001 1000010000 1010000100 1100000000 1001000100 1000001000 1100000001 1000000000 1000000000 1010000100

Expected output:
10231323311


Actual output:
10002433101


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
a=sorted(a,reverse=True)
print(sum(a[1:2*n:2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
print(sum(A[n:n+n]))


Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101100011 0100110000 0111110101 1000000000 1001000111 1000000001 1000110001 0010000110 0100000001 1001011100 1000011000 1110001001 1000001000 1000000000 1000000100

Expected output:
10233633212


Actual output:
10003346313


Fixed submission (verdict: Accepted):
n = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
print(sum(A[1:2*n:2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


n = int(input().rstrip())

numbers = list(sorted(map(int, input().rstrip().split(" "))))

ans = sum(numbers[n:n*2])
print(ans)


Failing test case input:
10
1000000000 1000100000 0100100001 0000001000 0000000000 1000000000 1000000000 0100000100 1000100000 1010000000 1000100110 1010000000 1000010000 1000011000 1010000000 1000000000 0100000000 0001100100 1000000000 1100000000 1000000001 1000000000 1010000000 1100100000 1001000100 1000000000 1000000001 1000000000 1000000000 1110000100

Expected output:
10121211101


Actual output:
10000121002


Fixed submission (verdict: Accepted):


n = int(input().rstrip())

numbers = list(reversed(sorted(map(int, input().rstrip().split(" ")))))

ans = 0
for i in range(n):
    ans += numbers[i*2+1]

print(ans)
Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = sorted(list(map(int,input().split())),reverse=True)
sum_a = 0
for i in range(1,2*n+1,2):
    print(a[i])
    sum_a += a[i]
print(sum_a)

Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 1000001001 1000001000 1000000000 1000000100 1000100000 1010100000 1000101110 1010000000 1000010000 1000011000 1010000000 1000000000 0100000000 0001100100 1000000000 1101000000 1000000001 1000010000 1010000000 1100000000 1001000100 1000001000 1000000001 1000100000 1000000000 1110000100

Expected output:
10221223210


Actual output:
1101000000
1100000000
1010000000
1010000000
1000101110
1000100000
1000011000
1000010000
1000001000
1000000100
10221223210


Fixed submission (verdict: Accepted):
n = int(input())
a = sorted(list(map(int,input().split())),reverse=True)
sum_a = 0
for i in range(1,2*n+1,2):
    sum_a += a[i]
print(sum_a)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=list(map(int,input().split()))
b=sorted(a)
ans1=sum(b[N:2*N])

print(ans1)

Failing test case input:
2
0 7 8 9 1 5

Expected output:
13


Actual output:
12


Fixed submission (verdict: Accepted):
N=int(input())
a=list(map(int,input().split()))
b=sorted(a)

ans3=0
for i in range(N):
    ans3 += b[i*2+N]

print(ans3)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = [int(i) for i in input().split()]
a = sorted(a,reverse = True)
s = 0
for i in range(N):
    s += a[2*(i+1)]
print(s)


Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 1000001001 1000001000 1010100000 1000000100 1000100000 1010100000 1100101110 1010000000 1000010000 1000011000 1010000000 1001100000 0100000000 0001100100 1000000000 1101000010 1000000001 1000010000 1010000100 1100000001 1001000100 1000001000 1100000001 1000000000 1000000000 1010000100

Expected output:
10231423211


Actual output:
10231312213


Fixed submission (verdict: Accepted):
N = int(input())
a = [int(i) for i in input().split()]
a = sorted(a,reverse = True)
s = 0
for i in range(N):
    s += a[2*i+1]
print(s)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=sorted(list(map(int,input().split())))
print(sum(a[2::2]))

Failing test case input:
10
1000000000 1000100000 0000000001 0000000000 0000000000 1000000000 1000000000 0000000000 1000000000 1010000000 1000000010 1000000000 1000000000 1000011000 1000000000 1000000000 1100000000 0000100100 1000000000 1000000000 1000000001 1000000000 1000000000 1100100000 1001000000 1000000000 1000000001 1000000000 1000000000 1000000000

Expected output:
10101011001


Actual output:
12101111101


Fixed submission (verdict: Accepted):
N=int(input())
a=sorted(list(map(int,input().split())))
print(sum(a[N::2]))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

N = int(sys.stdin.readline())
a = sorted(list(map(int, sys.stdin.readline().split(" "))))
sum = 0
for i in range(3 * N):
  if i % 3 == 1:
    sum += a[i]
print(sum)

Failing test case input:
10
1000000000 1000100100 1100100011 0000001000 1000001001 1000001000 1010100000 1000000100 1000100000 1010100000 1100101110 1010000000 1000010000 1000011000 1010000000 1001100000 0100000000 0001100100 1000000000 1101000110 1000000001 1000010000 1010000100 1100000001 1001000100 1000001000 1100001001 1000000000 1000000000 1010000100

Expected output:
10231424311


Actual output:
9221312412


Fixed submission (verdict: Accepted):
import sys
 
N = int(sys.stdin.readline())
a = sorted(list(map(int, sys.stdin.readline().split(" "))), reverse=True)
sum = 0
for i in range(N):
  sum += a[2 * i + 1]
print(sum)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)[::-1]
print(sum(a[n-1:2*(n-1)+1]))

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101000111 1010000101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001000 1000001000 1000000000 1000000100

Expected output:
10333334235


Actual output:
10032446313


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
print(sum(a[n::2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
print(sum(sorted(map(int,input().split()))[-1-n:-1]))

Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000001001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1101100010 0100110000 0001100100 1000000000 1101000111 1000000011 1000110001 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10332322322


Actual output:
10551302434


Fixed submission (verdict: Accepted):
n=int(input())
print(sum(sorted(map(int,input().split()))[n::2]))

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
a.sort()
print(sum(a[n:2*n]))


Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100101 1000000000 1101000111 1000000011 1000110001 0010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10332622133


Actual output:
10021545312


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
a.sort()
print(sum(a[n:3*n:2]))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
N = int(sys.stdin.readline().rstrip())
a = sorted(list(map(int, sys.stdin.readline().rstrip().split())))
ans = 0
for i in range(N*2+1)[N::2]:
    ans += a[i]
print(ans)


Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1010000001 1100110000 1001011000 1011100000 1101100011 0100110000 0111110101 1000000000 1001000111 1000000001 1000110001 0010000110 0100000001 1001011100 1000011000 1110001001 1000001000 1000000000 1000000100

Expected output:
10233632113


Actual output:
6011222102


Fixed submission (verdict: Accepted):
import sys
N = int(sys.stdin.readline().rstrip())
a = sorted(list(map(int, sys.stdin.readline().rstrip().split())), reverse = True)
ans = 0
for i in range(N):
    ans += a[2*i+1]
print(ans)
Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
mod=10**9+7
ans=pow(10,n,mod)
ans-=pow(9,n,mod)*2
ans+=pow(8,n,mod)
print(ans)

Failing test case input:
15421

Expected output:
778744163


Actual output:
-1221255851


Fixed submission (verdict: Accepted):
n=int(input())
mod=10**9+7
ans=pow(10,n,mod)
ans-=pow(9,n,mod)*2
ans+=pow(8,n,mod)
print(ans%mod)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

from sys import stdin
input = stdin.readline

def main():
    p = 10**9+7
    n = int(input().strip())
    if 1 < n:
        print((n-1)*n)
    else:
        print(0)
    

if __name__ == "__main__":
    main()


Failing test case input:
6100

Expected output:
898681079


Actual output:
37203900


Fixed submission (verdict: Accepted):

from sys import stdin
input = stdin.readline
MOD = 10**9+7

def main():
    n = int(input().strip())
    ans = 10**n - 9**n - 9**n + 8**n
    print(ans%MOD)

if __name__ == "__main__":
    main()

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
ans = (9**N - 2*8**N + 7**N)%(10**9+7)
print(ans)

Failing test case input:
2763

Expected output:
154890789


Actual output:
921730840


Fixed submission (verdict: Accepted):
N = int(input())
ans = (10**N - 2*9**N + 8**N)%(10**9+7)
print(ans)

Problem: p02554
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
INF = 10**9+7
t = 1
e = 1
n = 1
for i in range(N):
  t = (t*10)%INF
  e = (e*8)%INF
  n = (n*9)%INF
print(t-2*n+e)

Failing test case input:
18262

Expected output:
566588237


Actual output:
-433411770


Fixed submission (verdict: Accepted):
N = int(input())
INF = 10**9+7
t = 1
e = 1
n = 1
for i in range(N):
  t = (t*10)%INF
  e = (e*8)%INF
  n = (n*9)%INF
print((t-2*n+e)%INF)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def bekijou(a,x):
  MOD = 1000000007
  ret = 1
  for _ in range(x):
    ret *= a
    ret %= MOD
  return ret
    
n=int(input())
sum = bekijou(9,n)
MOD = 1000000007
ret = (2 * sum) % MOD
ret += MOD - bekijou(8,n)
ret = bekijou(10,n) + MOD - ret
print(ret)

Failing test case input:
16172

Expected output:
606375049


Actual output:
-393624958


Fixed submission (verdict: Accepted):
def bekijou(a,x):
  MOD = 1000000007
  ret = 1
  for _ in range(x):
    ret *= a
    ret %= MOD
  return ret
    
n=int(input())
MOD = 1000000007
ret = (bekijou(10,n)+MOD-((2*bekijou(9,n)) % MOD)+bekijou(8,n))%MOD
print(ret)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
mod = 10**9 + 7
print(pow(10, n, mod) - 2*pow(9, n, mod) - pow(8, n, mod))

Failing test case input:
2282

Expected output:
450657193


Actual output:
-80637661


Fixed submission (verdict: Accepted):
n = int(input())
mod = 10**9 + 7
print((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod)) % mod)
Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


N = int(input())

ron = 10 ** 9 + 7

a = (10 ** N) % ron

b = (9 ** N) % ron

c = (9 ** N) % ron 

bandc = (8 ** N) % ron

ans = a - b - c + bandc

print("{}".format(ans))

Failing test case input:
1889

Expected output:
325108626


Actual output:
-674891381


Fixed submission (verdict: Accepted):


N = int(input())

ron = 10 ** 9 + 7

a = (10 ** N) % ron

b = (9 ** N) % ron

c = (9 ** N) % ron 

bandc = (8 ** N) % ron

ans = (a - b - c + bandc) % ron

print("{}".format(ans))

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
mod=10**9+7
print(pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod))

Failing test case input:
18262

Expected output:
566588237


Actual output:
-433411770


Fixed submission (verdict: Accepted):
n=int(input())
mod=10**9+7
print((pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod))%mod)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
mod = 10 ** 9 + 7
print(pow(10, n, mod) - pow(9, n, mod) - pow(9, n, mod) + pow(8, n, mod))

Failing test case input:
2627

Expected output:
951498737


Actual output:
-48501270


Fixed submission (verdict: Accepted):
n = int(input())
mod = 10 ** 9 + 7
print((pow(10, n, mod) - pow(9, n, mod) - pow(9, n, mod) + pow(8, n, mod)) % mod)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
F = 10 ** 9 + 7
ans = 0
ans = 10 ** N % F
ans -= int((2*9**N) %F)
ans += int((8**N) %F)
print(ans)

Failing test case input:
5805

Expected output:
377464190


Actual output:
1377464197


Fixed submission (verdict: Accepted):
N = int(input())
F = 10 ** 9 + 7
ans = 0
ans = 10 ** N % F
ans -= int((2 * 9 ** N) % F)
ans += int((8 ** N) % F)
ans = int(ans % F)
print(ans)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

mod = 10 ** 9 + 7
nn = 10 ** N%mod % mod
nm = 2 * (9 ** N) % mod - (8 ** N) % mod

print(nn - nm)


Failing test case input:
20670

Expected output:
311209106


Actual output:
1311209113


Fixed submission (verdict: Accepted):
N = int(input())

mod = 10 ** 9 + 7
nn = 10 ** N
nm = (9 ** N) + (9 ** N) - (8 ** N)
a = (nn -nm) % mod
print(a)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
m=10**9+7
n=int(input())
a=(8**n)%m
b=(9**n)%m
c=(10**n)%m
print((2*b-c+a)%m)

Failing test case input:
6812

Expected output:
797002527


Actual output:
815500474


Fixed submission (verdict: Accepted):
m=10**9+7
n=int(input())
a=(8**n)%m
b=(9**n)%m
c=(10**n)%m
print((c-2*b+a)%m)

Problem: p02554
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = 869121
a = 10 ** n - 2 * 9 ** n + 8 ** n
print(a % (10 ** 9 + 7))

Failing test case input:
6100

Expected output:
898681079


Actual output:
2511445


Fixed submission (verdict: Accepted):
n = int(input())
a = 10 ** n - 2 * 9 ** n + 8 ** n
print(a % (10 ** 9 + 7))
Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

mod = 10**9 +7

def powmod(x,y):
    res = 1
    for i in range(0,y,1):
        res = (res*x) % mod
    return res


ans = powmod(10,N) - powmod(9,N) - powmod(9,N) + powmod(8,N)

print(ans)

Failing test case input:
32828

Expected output:
735815477


Actual output:
-1264184537


Fixed submission (verdict: Accepted):
N = int(input())

mod = 10**9 +7

def powmod(x,y):
    res = 1
    for i in range(0,y,1):
        res = (res*x) % mod
    return res


ans = (powmod(10,N) - powmod(9,N) - powmod(9,N) + powmod(8,N)) % mod

print(ans)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

if N == 1:
    print(0)
else:
    a = (10**N) % (10**9+7)
    b = (2*(9**N)) % (10**9+7)
    c = (8**N) % (10**9+7)
    print(a-b+c)

Failing test case input:
76846

Expected output:
501630130


Actual output:
1501630137


Fixed submission (verdict: Accepted):
N = int(input())

if N == 1:
    print(0)
else:
    a = (10**N) % (10**9+7)
    b = (2*(9**N)) % (10**9+7)
    c = (8**N) % (10**9+7)
    print((a-b+c)%(10**9+7))

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
mod = 10 ** 9 + 7

print((10 ** n) % mod - (9 ** n) % mod * 2 + 8 ** n % mod)

Failing test case input:
16756

Expected output:
461790329


Actual output:
-538209678


Fixed submission (verdict: Accepted):
n = int(input())
mod = 10 ** 9 + 7

print((10 ** n - (9 ** n) * 2 + 8 ** n) % mod)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
m=10**9+7
print((10**n)%m-(9**n)%m-(9**n)%m+(8**n)%m)

Failing test case input:
2133

Expected output:
650618801


Actual output:
-349381206


Fixed submission (verdict: Accepted):
n=int(input())
m=10**9+7
print((10**n-2*9**n+8**n)%m)

Problem: p02554
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):




import sys
import heapq, functools, collections
import random
from collections import Counter, defaultdict





k = int(input())







if k == 1:
    print(0)
    sys.exit()





res = 0
MOD = 10**9 + 7

have_all = pow(10,k,MOD)
dont_have_0 = pow(9,k,MOD)
dont_have_9 = pow(9,k,MOD)
dont_have_09 = pow(8,k,MOD)

print(have_all - dont_have_0 - dont_have_9 + dont_have_09)


Failing test case input:
2627

Expected output:
951498737


Actual output:
-48501270


Fixed submission (verdict: Accepted):




import sys
import heapq, functools, collections
import random
from collections import Counter, defaultdict





k = int(input())







if k == 1:
    print(0)
    sys.exit()





res = 0
MOD = 10**9 + 7

have_all = pow(10,k,MOD)
dont_have_0 = pow(9,k,MOD)
dont_have_9 = pow(9,k,MOD)
dont_have_09 = pow(8,k,MOD)

print((have_all - dont_have_0 - dont_have_9 + dont_have_09) % MOD)
Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
mod = pow(10, 7) + 7
def powmod(x, y):
    res = 1
    for i in range(y):
        res = res * x % mod
    return res


n = int(input())
ans = powmod(10, n) - powmod(9, n) - powmod(9, n) + powmod(8, n)
ans %= mod
ans = (ans + mod) % mod
print(ans)


Failing test case input:
127499

Expected output:
463923590


Actual output:
5869215


Fixed submission (verdict: Accepted):
mod = pow(10, 9) + 7
def powmod(x, y):
    res = 1
    for i in range(y):
        res = res * x % mod
    return res

n = int(input())
ans = powmod(10, n) - powmod(9, n) - powmod(9, n) + powmod(8, n)
ans %= mod
ans = (ans + mod) % mod
print(ans)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    MOD = 10 ** 9 + 7

    N = int(input())
    ans = pow(10, N, MOD) - pow(9, N, MOD) * 2 + pow(8, N, MOD)
    print(ans)

    
    
    
    
    
    pass


if __name__ == '__main__':
    main()











Failing test case input:
4064

Expected output:
961003123


Actual output:
-38996884


Fixed submission (verdict: Accepted):
def main():
    MOD = 10 ** 9 + 7

    N = int(input())
    ans = (pow(10, N, MOD) - pow(9, N, MOD) * 2 + pow(8, N, MOD)) % MOD
    print(ans)


if __name__ == '__main__':
    main()

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
Ans=10**N%(10**9+7)-2*(9**N%(10**9+7))+8**N%(10**9+7)
print(Ans)

Failing test case input:
1294

Expected output:
440007546


Actual output:
-559992461


Fixed submission (verdict: Accepted):
N=int(input())
Ans=(10**N%(10**9+7)-2*(9**N%(10**9+7))+8**N%(10**9+7))%(10**9+7)
print(Ans)

Problem: p02554
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())

MOD = 10 ** 9 + 7

print( ((n * (n - 1)) * (10 ** (n - 2)) if n > 1 else 0 ) % MOD )

Failing test case input:
15421

Expected output:
778744163


Actual output:
33856177


Fixed submission (verdict: Accepted):
n = int(input())

MOD = 10 ** 9 + 7

print( (10 ** n - (2 * ( 9 ** n) - (8 ** n))) % MOD )

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    N = int(readline())
    K = int(1e9) + 7
    ans = pow(10, N, K) - pow(9, N, K) - pow(9, N, K) + pow(8, N, K)
    print(ans)
if __name__ == '__main__':
    main()


Failing test case input:
25334

Expected output:
739064382


Actual output:
-260935625


Fixed submission (verdict: Accepted):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    N = int(readline())
    K = int(1e9) + 7
    ans = pow(10, N, K) - pow(9, N, K) - pow(9, N, K) + pow(8, N, K)
    print(ans%K)
if __name__ == '__main__':
    main()
Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

num = N*(N-1)*(10**(N-2)) % (10**9 +7)
print(num)



Failing test case input:
2763

Expected output:
154890789


Actual output:
783167892


Fixed submission (verdict: Accepted):
N = int(input())

num = 10**N - 2*(9**N) + 8**N
print(num % (10**9 + 7))

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
mod = 10**9 + 7


def powmod(val, n, mod):
    ret = 1
    for i in range(n):
        ret = ret * val % mod

    return ret


all = powmod(10, N, mod)
b = powmod(9, N, mod)
c = powmod(8, N, mod)

ans = all - (2*b - c)
ans = powmod(10, N, mod) - (powmod(9, N, mod) + powmod(9, N, mod) - powmod(8, N, mod))

print(ans)

Failing test case input:
18734

Expected output:
457675837


Actual output:
1457675844


Fixed submission (verdict: Accepted):
N = int(input())
mod = 10**9 + 7


def powmod(val, n, mod):
    ret = 1
    for i in range(n):
        ret = ret * val % mod

    return ret


all = powmod(10, N, mod)
b = powmod(9, N, mod)
c = powmod(8, N, mod)

ans = (all - (2*b - c))%mod

print(ans)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())


def ruizyou(x, n, S=1):
    
    S = 1
    for _ in range(n):
        S = (S*x)%(1e9+7)
    
    return S
    
a = int( ruizyou(10, N) + ruizyou(8, N) - ruizyou(9, N)*2 )

print(a%(1e9+7))

Failing test case input:
3223

Expected output:
426636884


Actual output:
426636884.0


Fixed submission (verdict: Accepted):
N = int(input())
 
 
def ruizyou(x, n, S=1):
    
    S = 1
    for _ in range(n):
        S = (S*x)%(1e9+7)
    
    return S
    
a = int( ruizyou(10, N) + ruizyou(8, N) - ruizyou(9, N)*2 )
 
print(int(a%(1e9+7)))

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
mod=10**9+7
ans = pow(10,n,mod)
ans =- pow(2*9,n,mod)
ans =+ pow(8,n,mod)
print(ans%mod)

Failing test case input:
241465

Expected output:
202510248


Actual output:
925013980


Fixed submission (verdict: Accepted):
n = int(input())
mod=10**9+7
ans = pow(10,n,mod)
ans -= pow(9,n,mod)*2
ans += pow(8,n,mod)
print(ans%mod)

Problem: p02554
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
mod = 10**9+7
N = int(input())
ans = pow(10, N, mod)
a = pow(9, N, mod)
b = pow(8, N, mod)
print(ans, a, b)
ans-=2*a-b
ans%=mod
print(ans)

Failing test case input:
99752

Expected output:
794180853


Actual output:
5354211 550739896 890306427
794180853


Fixed submission (verdict: Accepted):
mod = 10**9+7
N = int(input())
ans = pow(10, N, mod)
a = pow(9, N, mod)
b = pow(8, N, mod)

ans-=2*a-b
ans%=mod
print(ans)

Problem: p02554
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
mod = 10**9+7
a = pow(10,n,mod)
b = pow(8,n,mod)
c = pow(9,n,mod)
ans = a-2*c+b
if ans < 0:
    print(ans+mod)
else:
    print(ans)

Failing test case input:
2763

Expected output:
154890789


Actual output:
1154890796


Fixed submission (verdict: Accepted):
n = int(input())
mod = 10**9+7
a = pow(10,n,mod)
b = pow(8,n,mod)
c = pow(9,n,mod)
ans = a-2*c+b
ans = ans%mod
if ans < 0:
    print(ans+mod)
else:
    print(ans)
Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
p = int(1e9)+7
N = int(input())
c = 1
for i in range(N):
    c = (c*10)%p
d = 1
for i in range(N):
    d = (d*9)%p
e = 1
for i in range(N):
    e = (e*8)%p
print(c-(d*2-e))

Failing test case input:
17848

Expected output:
506395298


Actual output:
-493604709


Fixed submission (verdict: Accepted):
p = int(1e9)+7
N = int(input())
c = 1
for i in range(N):
    c = (c*10)%p
d = 1
for i in range(N):
    d = (d*9)%p
e = 1
for i in range(N):
    e = (e*8)%p
print((c-(d*2-e))%p)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
val1 = 10
val2 = 9
val3 = 8
if n == 1:
    print(0)
else:
    for i in range(n-1):
        val1 = (val1*10)%(10**9+7)
        val2 = (val2*9)%(10**9+7)
        val3 = (val3*8)%(10**9+7)
    ans = int(val1-2*val2+val3)
    if ans<0:
        print(ans+1000000007)
    else:
        print(ans)

Failing test case input:
18734

Expected output:
457675837


Actual output:
1457675844


Fixed submission (verdict: Accepted):
n = int(input())
val1 = 10
val2 = 9
val3 = 8
if n == 1:
    print(0)
else:
    for i in range(n-1):
        val1 = (val1*10)%(10**9+7)
        val2 = (val2*9)%(10**9+7)
        val3 = (val3*8)%(10**9+7)
    ans = int((val1-2*val2+val3)%(10**9+7))
    if ans<0:
        print(ans+1000000007)
    else:
        print(ans)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
mod = 10**9+7
print(10**N%mod - 2*9**N%mod + 8**N%mod)

Failing test case input:
9378

Expected output:
349134206


Actual output:
-650865801


Fixed submission (verdict: Accepted):
N = int(input())
mod = 10**9+7
print((10**N%mod - 2*9**N%mod + 8**N%mod)%mod)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
M=10**9+7
ans=1
m=1
for i in range(N):ans=(ans*10)%M
for i in range(N):m=(m*9)%M
ans-=(m*2)%M
m=1
for i in range(N):m=(m*8)%M
print(ans+m)

Failing test case input:
15421

Expected output:
778744163


Actual output:
-221255844


Fixed submission (verdict: Accepted):
N=int(input())
M=10**9+7
ans=1
m=1
for i in range(N):ans=(ans*10)%M
for i in range(N):m=(m*9)%M
ans-=(m*2)%M
m=1
for i in range(N):m=(m*8)%M
print((ans+m)%M)

Problem: p02554
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
INF = 10 ** 9 + 7
print(pow(10, N, INF) - 2 * pow(9, N, INF) + pow(8, N, INF))

Failing test case input:
99752

Expected output:
794180853


Actual output:
-205819154


Fixed submission (verdict: Accepted):
N = int(input())
INF = 10 ** 9 + 7
print((pow(10, N, INF) - 2 * pow(9, N, INF) + pow(8, N, INF)) % INF)