TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())

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

point_sum = 0

for n in range(N):
    head = d.pop(0)
    point_sum += sum(list(map(lambda x : x * head, d)))

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

point_sum = 0

for n in range(N):
    head = d.pop(0)
    point_sum += sum(list(map(lambda x : x * head, d)))
    
print(point_sum)

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

point_sum = 0

for n in range(N):
    head = d.pop(0)
    point_sum += sum(list(map(lambda x : x * head, d)))
    
print(point_sum)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
import sys
import time
import math
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

N = int(input())
d = [int(input()) for _ in range(N)]
ans = 0
for i in range(N-1):
	for j in range(i+1, N):
		ans += d[i] * d[j]
print(ans)
	

# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)


import sys
import time
import math
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

N = int(input())
d = inpl()
ans = 0
for i in range(N-1):
	for j in range(i+1, N):
		ans += d[i] * d[j]
print(ans)
	

# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)


Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
d = list(map(int, input().split()))

ans = 0

for i in range(N):
  for j in range(N):
    if i != j:
      ans += d[i]*d[j]
      
print(ans/2)

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

ans = 0

for i in range(N):
  for j in range(N):
    if i != j:
      ans += d[i]*d[j]
      
print(ans//2)


Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
a=int(input())
b=0
c=list(map(int,input().split()))
for i in range(a):
  for k in range(a):
    b=b+c[i]*c[k]
for u in range(a):
  b=b-c[u]*c[u]
print(b/2)

a=int(input())
b=0
c=list(map(int,input().split()))
for i in range(a):
  for k in range(a):
    b=b+c[i]*c[k]
for u in range(a):
  b=b-c[u]*c[u]
print(b)

a=int(input())
b=0
c=list(map(int,input().split()))
for i in range(a):
  for k in range(a):
    b=b+c[i]*c[k]
for u in range(a):
  b=b-c[u]*c[u]
print(int(b/2))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
d = map(int, input().split())
s = 0
for i in range(n):
    for j in range(n):
        if i != j:
            s += d[i] * d[j]
print(int(s/2))

n = int(input())
d = [int(input()) for i in range(n)]
s = 0
for i in range(n):
    for j in range(n):
        if i != j:
            s += d[i] * d[j]
print(s/2)

n = int(input())
d = [int(input()) for i in range(n)]
s = 0
for i in range(n):
    for j in range(n):
        if i != j:
            s += d[i] * d[j]
print(int(s/2))

n = int(input())
d = list(map(int, input().split()))
s = 0
for i in range(n):
    for j in range(n):
        if i != j:
            s += d[i] * d[j]
print(int(s/2))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
li = list(map(int, input().split()))
ans = 0
for i in range(len(li)):
	for j in range(len(li)):
		if i != j:
			ans += li[i]*li[j]
print(ans/2)

N = int(input())
li = list(map(int, input().split()))
ans = 0
for i in range(len(li)):
	for j in range(len(li)):
		if i != j:
			ans += li[i]*li[j]
print(int(ans/2))

Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
import itertools
n = int(input())
dn = list(map(int, input().split())
print(sum(d*cumulate for d, cumulate in zip(dn[1:], itertools.accumulate(dn)))

import itertools
N=int(input())
D=list(map(int,input().split()))
print(sum(d*cumulate for d,cumulate in zip(D[1:],itertools.accumulate(D))))

Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
d_list = list(map(int, input().split()))

score = 0
for i in d_list:
  for j in d_list:
    score += i * j
    
print(score)

n = int(input())
d_list = list(map(int, input().split()))

score = 0
for i in range(len(d_list) - 1):
  for j in range(i + 1, len(d_list)):
    score += d_list[i] * d_list[j]
    
print(score)

Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
dd = list(map(int, input().split()))
ans = []
for d1 in dd:
    for d2 in dd:
        if d1 != d2:
            ans.append(d1*d2)
print(sum(ans)/2)

N = int(input())
dd = list(map(int, input().split()))
ans = []
for i in range(N):
    for d2 in dd[i+1:]:
        ans.append(dd[i]*d2)
print(sum(ans))

Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
del = list(map(int, input().split()))
sum = 0
i = 0

while i < n - 1:
  k = i
  while k < n - 1:
    k += 1
    sum += del[i] * del[k]
  i += 1
  
print(str(sum))



del = [int(d) for d in input().split()]
n = len(del)
sum = 0
i = 0

while i < n - 1:
  k = i
  while k < n - 1:
    k += 1
    sum += del[i] * del[k]
  i += 1
  
print(sum)



del = list(map(int, input().split()))
n = len(del)
sum = 0
i = 0

while i < n - 1:
  k = i
  while k < n - 1:
    k += 1
    sum += del[i] * del[k]
  i += 1
  
print(str(sum))



n = int(input())
del = list(map(int, input().split()))
sum = 0
i = 0

while i < n - 1:
  k = i
  while k < n - 1:
    k += 1
    sum += del[i] * del[k]
  i += 1
  
print(sum)



del = list(map(int, input().split()))
n = len(del)
sum = 0
i = 0

while i < n - 1:
 
  k = i
  while k < n - 1:
    k += 1
    sum += del[i] * del[k]
    
  i += 1
  
print(str(sum))



del = list(map(int, input().split()))
n = len(del)
sum = 0
i = 0

while i < n - 1:
  k = i
  while k < n - 1:
    k += 1
    sum += del[i] * del[k]
  i += 1
  
print(sum)



del = list(map(int, input().split()))
n = len(del)
sum = 0
i = 0


print(sum)



del = list(map(int, input(),split()))
n = len(del)
sum = 0
i = 0

while i < n - 1:
 
  k = i
  while k < n - 1:
    k += 1
    sum += del[i] * del[k]
    
  i += 1
  
print(str(sum))



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

sum = 0
i = 0


print(sum)



del = list(map(int, input().split()))
n = len(del)
sum = 0
i = 0

while i < n - 1:
  k = i
  while k < n - 1:
    k += 1
    sum += del[i] * del[k]
  i += 1
  
print(str(sum))



# 2019-11-19 10:28:31(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
# import numpy as np 


def main():
    n, *d = map(int, sys.stdin.read().split())

    total = 0
    for i, j in itertools.combinations(d, 2):
        total += i * j
    print(total)


if __name__ == "__main__":
    main()


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):

N = int(input())

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


sum = 0
for i1 in range(len(l)):
    for i2 in range(i1+1, len(l)):
        print("i1 {} i2 {}".format(l[i1], l[i2]))
        sum += l[i1] * l[i2]

print(sum)


N = int(input())

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


if len(l) == 1:
    print(l)
else:
    sum = 0

    for i1 in range(len(l)):
        for i2 in range(i1+1, len(l)):
            sum += l[i1] * l[i2]

    print(sum)

Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
d = [int(input()) for k in range(N)]
sum = 0
for i in range(N):
    for j in range range(i):
        sum = sum + d[i+1] * d[j+1]
print(sum)

N = int(input())
d = [int(input()) for k in range(N)]
sum = 0
for i in range(N):
    for j in range(i+1):
        sum = sum + d[i] * d[j]
print(sum)

N = int(input())
d = [int(input()) for i in range(N)]
sum = 0
for i in range(N):
    if i > 0:
        for j in range(i):
            sum = sum + d[i] * d[j]
print(sum)

N = int(input())
d_(i+1) = [ int(input()) for i in range(N)]
sum = 0
for i in range(N):
    for j in range range(i-1):
        sum = sum + d_i * d_j
print(sum)

N = int(input())
d = [int(input()) for k in range(N)]
sum = 0
for i in range(N):
    for j in range range(i-1):
        sum = sum + d[i] * d[j]
print(sum)

N = int(input())
d = list(map(int,input().split()))
sum = 0
for i in range(N):
    if i > 0:
        for j in range(i):
            sum = sum + d[i] * d[j]
print(sum)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
d = list(map(int, input().split()))

val = 0
sum = 0

for i in range(N - 1):
    val += d[i]
    sum += d[i + 1]

print(sum)


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

val = 0
sum = 0

for i in range(N - 1):
    val += d[i]
    sum += val * d[i + 1]
    
print(sum)


Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n=int(input())
d=list(map(int,input().split()))
sam=0

for i in range(n):
  for j in range(n-1):
    sam=sam+(d[i]*d[j+1])

print(sam)

n=int(input())
d=list(map(int,input.split()))
sam=0

for i in range(n):
  for j in range(n-1):
    sam=sam+(d[i]*d[J+1])

print(sam)

n=int(input())
d=list(map(int,input().split()))
sam=0

for i in range(n):
  for j in range(n-i):
    sam=sam+(d[i]*d[j+1])

print(sam)

n=int(input())
d=list(map(int,input.split()))
sam=0

for i in range(n):
  for j in range(n-1):
    sam=sam+(d[i]*d[j])

print(sam)

n=int(input())
d=list(map(int,input().split()))
sam=0

for i in range(n):
  for j in range(i-1):
    sam=sam+(d[i]*d[j+1])

print(sam)

n=int(input())
d=list(map(int,input.split()))
sam=0

for i in  range(n):
  for j in range(n-1):
    sam=sam+(d[i]*d[j])

print(sam)

n=int(input())
d=list(map(int,input().split()))
sam=0

for i in range(n):
  for j in range(i+1,n): 
    sam=sam+(d[i]*d[j]) 
    

print(sam)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
d = list(map(int, input().split()))
ans = 0
for i in n -1:
	for j in (i + 1: n):
		ans += d[i] * d[j]
		
print(ans)

n = int(input())
d = list(map(int, input().split()))
ans = 0
for i in range(n -1):
	for j in range(i + 1, n):
		ans += d[i] * d[j]
		
print(ans)

Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N=int(input())
d=[0]*N
d=map(int,input().sort())
res=0

for i in range(N-1):
    for j in range(N-i):
        res+=d[i]*d[j]

print(res)

N=int(input())
d=list(map(int,input().split()))
res=0

for i in range(N-1):
    for j in range(N-i-1):
        #d[i+1]~d[N-1]
        res+=d[i]*d[i+j+1]


print(res)

Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
d = list(map(int, input().split()))
sum = 0
print(N)
print(d)

for fst in range(N-1):
  for snd in range(fst + 1,N):
    sum = sum + d[fst] * d[snd]
    
print(sum)
  

N = int(input())
d = list(map(int, input().split()))
sum = 0

for fst in range(N-1):
  for snd in range(fst + 1,N):
    sum = sum + d[fst] * d[snd]
    
print(sum)
  

Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
l = [*map(int,input().split())]
s,res = l[0],0
for i in range(1,n):
  res+=s*l[i]
  s+=l[i]
print(s)


n = int(input())
l = list(map(int,input().split()))
s,res = l[0],0
for i in range(1,n):
  res+=s*l[i]
  s+=l[i]
print(res)


Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
d = list(map(int, input().split()))

M = 0
for i in range(N):
  for j in range(i+1, N):
    M = max(M, d[i]*d[j])
    
print(M)

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


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

Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):

n = int(input())
d = [int(i) for i in input().split()]

ans = 0
for i in range(n):
    x = d[i]
    for y in d[i+1:]:
        ans += x*y
print(ans


n = int(input())
d = [int(i) for i in input().split()]

ans = 0
for i in range(n):
    x = d[i]
    for y in d[i+1:]:
        ans += x*y
print(ans)

Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
d = [int(i) for i in input().split()]
s = 0
for i in range(n-1):
  for j in range(i+1,n):
    s+=i*j
print(s)

n = int(input())
d = [int(i) for i in input().split()]
s = 0
for i in range(n-1):
  for j in range(i+1,n):
    s+=d[i]*d[j]
print(s)


Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
if __name__ == "__main__":
    num = int(input())
    base_list=[]
    tmp_list=[]
    ans=0
    base_list = input().split()
    tmp_list = deepcopy(base_list)
    for i in base_list:
        print("i:"+i)
        tmp_list.remove(i)
        for j in tmp_list:
            ans+=int(i)*int(j)
    print(ans)

from copy import deepcopy

if __name__ == "__main__":
    num = int(input())
    base_list=[]
    tmp_list=[]
    ans=0
    base_list = input().split()
    tmp_list = deepcopy(base_list)
    for i in base_list:
        tmp_list.remove(i)
        for j in tmp_list:
            ans+=int(i)*int(j)
    print(ans)

Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
import itertools


def actual(n, D):
    comb = itertools.combinations(D, 2)

    # return sum([x * y for x, y in comb])

    
    s = 0
    for i in range(len(D)):
        for j in range(i + 1, len(D)):
            s += D[i] * D[j]

    return s

n = int(input())
s = input()

print(actual(n, s))

import itertools


def actual(n, D):
    
    comb = itertools.combinations(D, 2)

    # return sum([x * y for x, y in comb])

    
    
    
    #     for j in range(i + 1, len(D)):
    
    #
    # return s

    
    s = 0
    for i in range(len(D) - 1):
        s += D[i] * sum(D[i + 1:])


n = int(input())
D = list(map(int, input().split()))

print(actual(n, D))


import itertools


def actual(n, D):
    
    comb = itertools.combinations(D, 2)

    # return sum([x * y for x, y in comb])

    
    
    
    #     for j in range(i + 1, len(D)):
    
    #
    # return s

    
    s = 0
    for i in range(len(D) - 1):
        s += D[i] * sum(D[i + 1:])

    return s


n = int(input())
D = list(map(int, input().split()))

print(actual(n, D))


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
result = 0
a = list(map(int, input().split()))

for i, v in enumerate(a):
  for i2, v2 in enumerate(a):
    if i != i2:
      result += v*v2
print(result)

n = int(input())
result = 0
a = list(map(int, input().split()))

for i, v in enumerate(a):
  for i2, v2 in enumerate(a):
    if i != i2:
      result += v*v2
print(result)

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

answer = 0
for i in range(N):
    for j in range(i+1,N):
        answer += d[i]*d[j]
print(answer)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n=int(input())
d = list(map(int, input().split()))
a=0
for i in range(0,len(d),1):
  if d[i]=d[-1]:
    break
  for j in d[i+1]:
    a+=d[i]*d[j]
print(a)

n=int(input())
d = list(map(int, input().split()))
a=0
for i in d:
  if d[i]=d[-1]:
    break
  for j in d[i+1:]:
    a+=d[i]*d[j]
print(a)

n=int(input())
d = list(map(int, input().split()))
a=0
for i in range(0,n,1):
  if i==n:
     break
  for j in d[i+1:]:
    a+=d[i]*j
print(a)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
import sys
N = int(sys.stdin.readline())
D = list(map(int,sys.stdin.readline().split()))

psum = sum(D)
var = 0
for i in range(N):
  var += D[i]**2
  
print(psum**2 - var)

import sys
N = int(sys.stdin.readline())
D = list(map(int,sys.stdin.readline().split()))

psum = sum(D)
var = 0
for i in range(N):
  var += D[i]**2
  
print((psum**2 - var) // 2)

Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
d = set(map(int, input().split())) 
s=0

for i in range(n):
   for j in range(i+1,n):
      s += d[i]*d[j]
print(s)

n = int(input())
d = list(map(int, input().split())) 
s=0
print(d)
for i in range(n):
   for j in range(i+1,n):
      s += d[i]*d[j]
print(s)

n = int(input())
d = list(map(int, input().split())) 
s=0
# print(d)
for i in range(n):
   for j in range(i+1,n):
      s += d[i]*d[j]
print(s)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(inout()) # the number of takoyaki
delicious = list(map(int,input().split()))
ans = 0
for i in range(0, n-1): 
  for j in range(i, n):
    ans += delicious[i] * delicious[j]
    
print(ans)

n = int(input()) # the number of takoyaki
delicious = list(map(int,input().split()))
ans = 0
for i in range(0, n-1): 
  for j in range(i+1, n):
    ans += delicious[i] * delicious[j]
    
print(ans)

Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
a=int(input())
b=list(map(int,input().split))
 
s=0
for i in range(a):
  for j in range(i+1,a):
    s+=b[i]*b[j]
print(s)

a=int(input())
b=list(map(int,input().split())
 
s=0
for i in range(a):
  for j in range(i+1,a):
    s+=b[i]*b[j]
print(s)

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

s=0
for i in range(a):
  for j in range(i+1,a):
    s+=d[i]*d[j]
print(s)
  


a=int(input())
b=list(map(int,input().split()))
 
s=0
for i in range(a):
  for j in range(i+1,a):
    s+=d[i]*d[j]
print(s)

a=int(input())
b=list(map(int,input().split()))
 
s=0
for i in range(a):
  for j in range(i+1,a):
    s+=b[i]*b[j]
print(s)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
sum=0
for i in a:
  x=i**2
  sum+=x
print((sum(a)**2)-sum)

n=int(input())
a=list(map(int,input().split()))
aa=0
for i in a:
  x=i**2
  aa+=x
print(((sum(a)**2)-aa)//2)


Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
int N = input()
d[]= map(int, input().split())

answer = 0

for x in N:
  for y in N-1:
    w = d[x]*d[y]/2
    answer += w

print(answer)


N = int(input())
d = [int(x) for x in input().split()]
f = sum(d)
s = 0

for i in f:
  s += i * (f-i)

print(s//2)


N = int(input())
d = [int(x) for x in input().split()]

f = sum(d)
s = 0

for i in d:
  s += i * (f-i)
print(s//2)
     

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n=int(input())
li = list(map(int,input().split()))
a=0
for i in range(n-1):
  for j in range(n):
    a += li[i]*li[j+1]
print(a)

n=int(input())
li = list(map(int,input().split()))
a=0
for i in range(n-1):
    for j in range(i+1,n):
        a+=li[i]*li[j]
print(a)

Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n=input()
arr=list(map(int,input().split()))
s=0
for i in range(0,n-1):
  for j in range(i+1,n):
    s+=arr[i]*arr[j]
print(s)

n=int(input())
arr=list(map(int,input().split()))
s=0
for i in range(0,n-1):
  for j in range(i+1,n):
    s+=arr[i]*arr[j]
print(s)

Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
d = list(map(int, input().split()))
ans = 0
for i in range(N-1):
  for j in range(i:N):
    ans += d[i] * d[j]
print (ans)

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

L = [d[x]*d[y] for x in range(N) for y in range(x+1,N)]
print (sum(L))

Verdicts: Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n-1):
  for j in range(n-1):
    ans += a[i] * a[j]
for k in range(n-1):
  ans -= a[k]
print(ans)

n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n-1):
  for j in range(n-1):
    ans += a[i] * a[j]
for k in range(n):
  ans -= a[k]
print(ans)

n = int(input())
a = list(map(int, input().split()))
ans = 0
b = (n*(n-1)) // 2
for i in range(n-1):
  for j in range(n-1):
    ans += a[i] * a[j]
for k in range(n):
  ans -= a[k]
print(ans)

n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
  for j in range(i +1, n):
    ans += a[i] * a[j]
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split())) 

X = 0
for a in range(1,N+1):
    if a < N:
        X += A[a]*sum(A[a+1:N+1])
    else:
        break

N = int(input())
A = list(map(int, input().split())) 
X = 0
for a in range(1,N+1):
    if a < N:
        X += A[a]*(sum(A[(a+1):(N+1)]))
print(X)

N = int(input())
A = list(map(int, input().split())) 
X = 0
for a in range(1,N):
    X += A[a]*(sum(A[(a+1):(N+1)]))
print(X)

N = int(input())
A = list(map(int, input().split())) 
X = 0
for a in range(N):
    if a+1 < N:
        x = A[a]
        y = sum(A[(a+1):(N+1)])
        X += x*y

print(X)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
a=int(input())
b=list(map(int,input().split()))
c=sum(b)
d=[(c-x)*x for x in b]
e=sum(d)
 print(e/2)

a=int(input())
b=list(map(int,input().split()))
c=sum(b)
d=[c*x for x in b]
 print(sum(d))

a=int(input())
b=list(map(int,input().split()))
c=sum(b)
d=[(c-x)*x for x in b]
e=sum(d)
print(int(e/2))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n = int(input())
d = list(map(int, input().split()))

print(n)
i = 0
j = 0
p = 0

while i < n - 1:
    while j < n - 1:
        p += d[i] * d[j + 1]
        j = j + 1 
    i = i + 1
    j = i
print('p=', p)

n = int(input())
d = list(map(int, input().split()))

print(n)
i = 0
j = 0
p = 0

while i < n - 1:
    while j < n - 1:
        p += d[i] * d[j + 1]
        j = j + 1 
    i = i + 1
    j = i
print(p)

n = int(input())
d = list(map(int, input().split()))

i = 0
j = 0
p = 0

while i < n - 1:
    while j < n - 1:
        p += d[i] * d[j + 1]
        j = j + 1 
    i = i + 1
    j = i
print(p)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N = int(input())
D = list(map(int, input().split()))

sum_all = 0
for i in range(N):
  for s in range(i, N):
    sum_all += D[i] * D[s]
    
print(sum_all)

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

sum_all = 0
for i in range(N):
  for s in range(i+1, N):
    sum_all += D[i] * D[s]
    
print(sum_all)

Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
n=int(input())
d_list=map(int,inout().spllit())
count=0
for i in range(n):
  count-=d_list[i]
  for j in range(n):
    count+=d_list[i]*d_list[j]
print(count)

n=int(input())
d_list=map(int,inout().spllit())
count=0
for i in range(n):
  for j in range(n):
    count+=d_list[i]*d_list[j]
  count-=d_list[i]**2
print(count)

n=int(input())
d_list=map(int,inout().spllit())
count=0
for i in range(n):
  count-=d_list[i]**2
  for j in range(n):
    count+=d_list[i]*d_list[j]
print(count)

n=int(input())
d_list=map(int,inout().spllit())
count=0
for i in range(n):
  for j in range(n):
    count+=d_list[i]*d_list[j]
  count-=d_list[i]**2
if n=2:
  print(count)
else:
  print(count/2)

n=int(input())
d_list=list(map(int,input().split()))
count=0
for i in range(n):
  for j in range(n):
    if i<j:
        count+=d_list[i]*d_list[j]
print(count)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
num = int(input())
heellist = input().split(' ')

HeelSum = 0

for i in range(0, num-1):
  for j in range(i+1, num-1):
    HeelSum += int(heellist[i]) * int(heellist[j])
print(HeelSum)

num = int(input())
heellist = input().split(' ')

HeelSum = 0

for i in range(0, num):
  for j in range(i+1, num):
    HeelSum += int(heellist[i]) * int(heellist[j])

print(HeelSum)

Verdicts: Wrong Answer

Accepted
Problem: It's now the season of TAKOYAKI FESTIVAL!  This year, N takoyaki (a ball-shaped food with a piece of octopus inside) will be served. The _deliciousness_ of the i-th takoyaki is d_i.  As is commonly known, when you eat two takoyaki of deliciousness x and y together, you restore x \times y health points.  There are \frac{N \times (N - 1)}{2} ways to choose two from the N takoyaki served in the festival. For each of these choices, find the health points restored from eating the two takoyaki, then compute the sum of these \frac{N \times (N - 1)}{2} values.

Submission attempts (in order):
N=int(input())
d = list(map(int, input().split()))
total=0
for n in range(N-1):
    for j in range(n+1,N):
        total+=d[n]*d[j]
total

import random
N=int(input("タコフェスの数："))
d=[]
total=0
for i in range(N):
    d.append(random.randint(0,100))
for n in range(N):
    for j in range(n+1,N):
        total+=d[n]*d[j]
total

N=int(input())
d=[]
total=0
for i in range(N):
    d.append(int(input()))
for n in range(N):
    for j in range(n+1,N):
        total+=d[n]*d[j]
total

N=int(input())
d=list(map(int, input().split()))
total=0
for n in range(N):
    for j in range(n+1,N):
        total+=d[n]*d[j]
total

N=int(input())
d = list(map(int, input().split()))
total=0
for n in range(N):
    for j in range(n+1,N):
        total+=d[n]*d[j]
total

N=int(input())
d = list(map(int, input().split()))
total=0
for n in range(N-1):
    for j in range(n+1,N):
        total+=d[n]*d[j]
print(total)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted