s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s196641244 | p02572 | u848097937 | 1600336270 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8768 | 1469 | //g++ -std=gnu++14 a.cpp
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <random>
#inclu... | File "/tmp/tmpp73it084/tmpi7hcaxjh.py", line 28
ll INFL = 1LL << 60;
^
SyntaxError: invalid decimal literal
| |
s722705085 | p02572 | u860546679 | 1600331705 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9016 | 781 | #include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple... | File "/tmp/tmprguus99q/tmp2pjc7ajb.py", line 13
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s951078738 | p02572 | u729790965 | 1600285928 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8852 | 165 | n=input()
a=input().split()
sum=0
for i in range(len(a)):
a[i]=(int)(a[i])
for i in a:
sum+=i
ans=0
ans+=(sum**2)
for i in a:
ans-=i*i
return (ans/2)%(10**9+7) | File "/tmp/tmpctii683i/tmpgh4ebzge.py", line 12
return (ans/2)%(10**9+7)
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'return' outside function
| |
s014555566 | p02572 | u729790965 | 1600285886 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9068 | 155 | a=input().split()
sum=0
for i in range(len(a)):
a[i]=(int)(a[i])
for i in a:
sum+=i
ans=0
ans+=(sum**2)
for i in a:
ans-=i*i
return (ans/2)%(10**9+7) | File "/tmp/tmpdk1m8dd0/tmps_t0jvmf.py", line 11
return (ans/2)%(10**9+7)
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'return' outside function
| |
s941988478 | p02572 | u729790965 | 1600285853 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8964 | 151 | a=input().split()
sum=0
for i in range(len(a)):
a[i]=(int)(a[i])
for i in a:
sum+=i
ans=0
ans+=(sum**2)
for i in a:
ans-=i*i
return ans%(10**9+7) | File "/tmp/tmpvq2wmkd7/tmp2z76edpl.py", line 11
return ans%(10**9+7)
^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'return' outside function
| |
s293788055 | p02572 | u729790965 | 1600285822 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8980 | 158 | a=(int)(input().split())
sum=0
for i in range(len(a)):
a[i]=(int)(a[i])
for i in a:
sum+=a
ans=0
ans+=(sum**2)
for i in a:
ans-=i*i
return ans%(10**9+7) | File "/tmp/tmpzsd7v1fg/tmpmp311ifp.py", line 11
return ans%(10**9+7)
^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'return' outside function
| |
s930956105 | p02572 | u729790965 | 1600285703 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9068 | 108 | a=input().split()
sum=0
for i in a:
sum+=a
ans=0
ans+=(sum**2)
for i in a:
ans-=i*i
return ans%(10**9+7) | File "/tmp/tmpopr2aicp/tmpze6xgzjr.py", line 9
return ans%(10**9+7)
^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'return' outside function
| |
s890207358 | p02572 | u729790965 | 1600285522 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8928 | 117 | a=map(int,input().split())
sum=0
for i in a:
sum+=a
ans=0
ans+=(sum**2)
for i in a:
ans-=i*i
return ans%(10**9+7) | File "/tmp/tmpb9exqo29/tmp36yy80fx.py", line 9
return ans%(10**9+7)
^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'return' outside function
| |
s524955996 | p02572 | u194542339 | 1600199620 | Python | PyPy3 (7.3.0) | py | Runtime Error | 100 | 92768 | 406 | # 与えられた数値の桁数と桁値の総和を計算する.
def calc_digit_sum(num):
digits = sums = 0
while num > 0:
digits += 1
sums += num % 10
num //= 10
return digits, sums
n = int(input())
arr = map(int, input().split())
MOD = 10 ** 9 + 7
answer = 0
t = itertools.combinations(arr, 2)
for i in t:
answer =... | Traceback (most recent call last):
File "/tmp/tmpz8ijo72k/tmpgt1vuyoq.py", line 11, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s565703742 | p02572 | u611090896 | 1600197558 | Python | Python (3.8.2) | py | Runtime Error | 44 | 24848 | 358 | N = int(input())
A = [list(map(str,input().split()) for i in range(N))]
mod = 10**9+7
ans=0
for i in range(2**N):
cl = [False]*N
for j in range(N):
if ((i>>j)&1):
cl[N-1-j] = True
total=''
if cl.count(True) == 2:
for k in range(len(cl)):
if cl[k]:
total+= A[k] + '*'
total+= '1'... | Traceback (most recent call last):
File "/tmp/tmpaawy_p3a/tmpu11_slg7.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s488205762 | p02572 | u760802228 | 1600195263 | Python | PyPy3 (7.3.0) | py | Runtime Error | 94 | 74176 | 180 | = int(input())
A = list(map(int, input().split()))
t = 0
S = sum(A)
c = 0
for i in range(len(A) - 1):
S -= A[i]
t = (t + (A[i] * S))
print(t % 1000000007)
| File "/tmp/tmppc9qkgaa/tmpob2tfi3p.py", line 1
= int(input())
IndentationError: unexpected indent
| |
s241807571 | p02572 | u637289184 | 1600168348 | Python | PyPy3 (7.3.0) | py | Runtime Error | 128 | 105576 | 140 | N = int(input())
A = list(map(int, input().split()))
sm=0
mod=10**9+7
s=sum(A)
for i in range(A):
s-=i
sm+=i*s
sm%=mod
print(sm) | Traceback (most recent call last):
File "/tmp/tmpif1zejfk/tmp6tzefy5o.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s850544769 | p02572 | u460763828 | 1600114320 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8876 | 314 | def main():
N = int(input())
A_list = list(map(int, input().split()))
mod = 10**9 + 7
ans = 0
A_ = sum(A_list) % mod
for i in range(N-1):
A = A_list[i]
A_ = A_ - A
ans = (ans + (A * A_) % mod)) % mod
print(ans)
return
if __name__ == '__main__':
main() | File "/tmp/tmp0gfw6hxy/tmptx8snwum.py", line 11
ans = (ans + (A * A_) % mod)) % mod
^
SyntaxError: unmatched ')'
| |
s116139261 | p02572 | u460763828 | 1600114288 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8948 | 312 | def main():
N = int(input())
A_list = list(map(int, input().split()))
mod = 10**9 + 7
ans = 0
A_ = sum(A_list) % mod
for i in range(N):
A = A_list[i]
A_ = A_ - A
ans = (ans + (A * A_) % mod)) % mod
print(ans)
return
if __name__ == '__main__':
main() | File "/tmp/tmpxk2ogbq0/tmpeqhcwxaa.py", line 11
ans = (ans + (A * A_) % mod)) % mod
^
SyntaxError: unmatched ')'
| |
s273151537 | p02572 | u770293614 | 1600083534 | Python | Python (3.8.2) | py | Runtime Error | 45 | 24872 | 142 | N=input()
A=map(int,input().split(' '))
summed=0
for i in range(0,N):
for j in range(i+1,N):
sumed+=A[i]*A[j]
MOD=10**9+7
print(sumed%MOD)
| Traceback (most recent call last):
File "/tmp/tmpswjt8uns/tmp_e0nsh1l.py", line 1, in <module>
N=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s324504055 | p02572 | u770293614 | 1600083199 | Python | Python (3.8.2) | py | Runtime Error | 47 | 24988 | 135 | N=input()
A=map(int,input().split(' '))
sum=0
for i in range(0,N):
for j in range(i+1,N):
sum+=A[i]*A[j]
MOD=10**9+7
print(sum%MOD)
| Traceback (most recent call last):
File "/tmp/tmpm_gtmkiq/tmpq_uwau9b.py", line 1, in <module>
N=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s993924093 | p02572 | u770293614 | 1600083158 | Python | Python (3.8.2) | py | Runtime Error | 46 | 25000 | 119 | N=input()
A=map(int,input().split(' '))
sum=0
for i in range(0,N):
for j in range(i+1,N):
sum+=A[i]*A[j]
print(sum) | Traceback (most recent call last):
File "/tmp/tmp6z50s1ti/tmp1u8xsgwe.py", line 1, in <module>
N=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s656621325 | p02572 | u616468898 | 1600076385 | Python | Python (3.8.2) | py | Runtime Error | 72 | 31772 | 214 | N = int(input())
A = list(map(int, input().split(' ')))
modn = int(1e9 + 7)
A = np.mod(A, modn)
ret = 0
for i in range(0, len(A)-1):
for j in range(i+1, len(A)):
ret += A[i]*A[j]
print(np.mod(ret, modn))
| Traceback (most recent call last):
File "/tmp/tmpyo_fckp3/tmpfn7wvac1.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s296887520 | p02572 | u497883442 | 1600021260 | Python | Python (3.8.2) | py | Runtime Error | 73 | 31448 | 191 | M = 1000000007
n = int(input())
a = list(map(int,input().split()))
S = [0]
for i in range(n):
S.append(S[-1]+a[i])%M
sum = 0
for i in range(n-1):
sum += (a[i]*(S[n]-S[i+1]))%M
print(sum%M)
| Traceback (most recent call last):
File "/tmp/tmpobpsa9da/tmp1__x1sbk.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s683567141 | p02572 | u212831449 | 1600019692 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9492 | 773 | import collections
n,m = map(int,input().split())
friend = [[] for i in range(n)]
for i in range(m):
a,b = map(int,input().split())
a -= 1
b -= 1
if a not in friend[b]:
friend[a].append(b)
friend[b].append(a)
q = collections.deque()
visited = [0 for i in range(n)]
ans = 0
for i in ran... | Traceback (most recent call last):
File "/tmp/tmpc3lv6q2m/tmp0pyy_k4_.py", line 3, in <module>
n,m = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s680594898 | p02572 | u290866833 | 1600006854 | Python | Python (3.8.2) | py | Runtime Error | 72 | 31544 | 173 | N = int(input())
A = list(map(int, input().split()))
S = sum(A)
for i in range(N-1):
S -= A[i]
ans += A[i] * S
ans = ans % (10 ** 9 +7)
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpdjsuy_6d/tmp5n9j7f_j.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s368649406 | p02572 | u820685137 | 1599919107 | Python | Python (3.8.2) | py | Runtime Error | 102 | 31412 | 241 | """C."""
import sys
input = sys.stdin.readline # noqa: A001
n = int(input())
a = list(map(int, input()[:-1].split(' ')))
result = 0
for i, v1 in enumerate(a):
for j in range(i + 1, n + 1):
result += v1 * a[j]
print(result)
| Traceback (most recent call last):
File "/tmp/tmpr2c234pa/tmpmsgy3q7a.py", line 7, in <module>
n = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s646510548 | p02572 | u820685137 | 1599919060 | Python | Python (3.8.2) | py | Runtime Error | 98 | 31352 | 236 | """C."""
import sys
input = sys.stdin.readline # noqa: A001
n = int(input())
a = list(map(int, input().split(' ')))
result = 0
for i, v1 in enumerate(a):
for j in range(i + 1, n + 1):
result += v1 * a[j]
print(result)
| Traceback (most recent call last):
File "/tmp/tmpqqghn9jy/tmpujnaoz94.py", line 7, in <module>
n = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s790578633 | p02572 | u964904181 | 1599916514 | Python | Python (3.8.2) | py | Runtime Error | 2193 | 1932596 | 349 | import numpy as np
n = int(input())
ai = np.array(list(map(int, input().split())))
# n=3
# ai = np.array([1, 2, 3])
ai = ai[np.newaxis, :]
ai2 = ai.T.dot(ai)
ai2u = np.triu(ai2, k=1)
s = ai2u.sum()
# l = len(ai)
#
# s = 0
# for j in range(l):
# for i in range(j+1, l):
# s += ai[j] * ai[i]
ans = s % ... | Traceback (most recent call last):
File "/tmp/tmpkco0mhnf/tmpx3iqo104.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s866580337 | p02572 | u861075868 | 1599876106 | Python | PyPy3 (7.3.0) | py | Runtime Error | 224 | 108696 | 437 | from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7
###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
f... | Traceback (most recent call last):
File "/tmp/tmp36p4p078/tmpfttve3z6.py", line 10, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s955723454 | p02572 | u861075868 | 1599875753 | Python | PyPy3 (7.3.0) | py | Runtime Error | 161 | 108156 | 467 | from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7
###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
f... | Traceback (most recent call last):
File "/tmp/tmprkdoptg3/tmpit400pkw.py", line 10, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s169626613 | p02572 | u651913160 | 1599856973 | Python | Python (3.8.2) | py | Runtime Error | 73 | 31744 | 143 | n = input()
a = list(map(int, input().split()))
b = sum(a)
sum = 0
for i in range(n):
b -= a[i]
sum += a[i]*b
print(sum%(10**9+7)) | Traceback (most recent call last):
File "/tmp/tmp73ebu46h/tmpxjxxr58v.py", line 1, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s931060096 | p02572 | u651913160 | 1599853629 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9120 | 195 | n = input()
a = list(map((int%10**9+7), input().split()))
sum = 0
for i in range(len(a)):
for j in range(len(a)):
if i<j:
sum += (a[i]) * (a[j])
print(sum % 10**9+7) | Traceback (most recent call last):
File "/tmp/tmp0itk9sz4/tmpd_txf37s.py", line 1, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s625440375 | p02572 | u217131455 | 1599850274 | Python | PyPy3 (7.3.0) | py | Runtime Error | 112 | 74284 | 308 | num = int(input())
input_line = input().split()
num_list = [int(input_line[i]) for i in range(num)]
law = 10 ** 9 + 7
sigma = 0
for i in range(num):
num_a = num_list[i]
temp_sum = 0
for j in range(i+1,num):
temp_sum += num_list[j]
sigma += num_a * temp_sum
sigma %= law
print(sigma)
| File "/tmp/tmph56yxg1n/tmpgi6tl71z.py", line 9
temp_sum = 0
^
IndentationError: unindent does not match any outer indentation level
| |
s475223661 | p02572 | u022722097 | 1599828545 | Python | Python (3.8.2) | py | Runtime Error | 75 | 31556 | 198 | n = int(input())
l = list(map(int,input().split()))
i=0;j=i+1
mod = 1000000000+7
sum=0
while i<n-1:
j = i+1
while j<n:
minsum=l[i]*l[j]
minsum%=mod
sum+=modsum
i+=1
print(sum)
| Traceback (most recent call last):
File "/tmp/tmp5f3mi6qw/tmpckx9ykg9.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s033968113 | p02572 | u183657342 | 1599824493 | Python | Python (3.8.2) | py | Runtime Error | 770 | 924592 | 164 | import numpy as np
n = int(input())
A = np.array(list(map(int, input().split())))
B = np.outer(A,A)
ans = (np.sum(B) - np.dot(A,A)) / 2 % (10**9+7)
print(int(ans)) | Traceback (most recent call last):
File "/tmp/tmp2lybcaq3/tmpge531rwq.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s533257250 | p02572 | u789565565 | 1599815101 | Python | Python (3.8.2) | py | Runtime Error | 39 | 13184 | 177 | import itertools
n = int(input())
a_lis = [int(input()) for i in range(n)]
sum = 0
mod = 10**9+7
for a,b in itertools.combinations(a_lis,2):
sum += (a*b)%mod
print(sum%mod) | Traceback (most recent call last):
File "/tmp/tmp0g7pm_w4/tmppx90wuwk.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s658156896 | p02572 | u789565565 | 1599815013 | Python | Python (3.8.2) | py | Runtime Error | 36 | 13124 | 185 | from itertools import combinations
n = int(input())
a_lis = [int(input()) for i in range(n)]
sum = 0
mod = 10**9+7
for a,b in combinations(a_lis,2):
sum += (a*b)%mod
print(sum%mod) | Traceback (most recent call last):
File "/tmp/tmpe6evutvx/tmpv34pj9hv.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s494474500 | p02572 | u492929439 | 1599765405 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8988 | 187 | N = int(input())
A = [int(num) for num in input().split()]
sumA = sum(A)
ans = 0
for i in range(len(A)):
sumA = sumA - A[i]
ans += A[i] * sumA
ans = ans % (10**9)+7)
print(ans) | File "/tmp/tmpzqgot6ag/tmpo4_59bzj.py", line 11
ans = ans % (10**9)+7)
^
SyntaxError: unmatched ')'
| |
s730030049 | p02572 | u492929439 | 1599765384 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9040 | 188 | N = int(input())
A = [int(num) for num in input().split()]
sumA = sum(A)
ans = 0
for i in range(len(A)):
sumA = sumA - A[i]
ans += A[i] * sumA
ans = ans % (10**9)+7))
print(ans) | File "/tmp/tmpoldhr87n/tmpv5xu2psi.py", line 11
ans = ans % (10**9)+7))
^
SyntaxError: unmatched ')'
| |
s872322479 | p02572 | u136282556 | 1599667605 | Python | Python (3.8.2) | py | Runtime Error | 38 | 13488 | 297 | import copy
N=int(input('N='))
s=0
list1=[]
while s<N:
A=int(input('Aを入力して下さい。'))
list1.append(A)
s=s+1
list2=copy.copy(list1)
x=0
for i in list1:
for j in list2:
if i<j:
x=x+i*j
else:
continue
x=x%(10**9+7)
print(str(x)) | Traceback (most recent call last):
File "/tmp/tmpaugfmwqd/tmparkwq6qz.py", line 2, in <module>
N=int(input('N='))
^^^^^^^^^^^
EOFError: EOF when reading a line
| N= |
s803991835 | p02572 | u136282556 | 1599667528 | Python | Python (3.8.2) | py | Runtime Error | 44 | 13476 | 297 | import copy
N=int(input('N='))
s=0
list1=[]
while s<N:
A=int(input('Aを入力して下さい。'))
list1.append(A)
s=s+1
list2=copy.copy(list1)
x=0
for i in list1:
for j in list2:
if i<j:
x=x+i*j
else:
continue
x=x%(10**9+7)
print(str(x)) | Traceback (most recent call last):
File "/tmp/tmpkvm1nrka/tmpfbdxxpth.py", line 2, in <module>
N=int(input('N='))
^^^^^^^^^^^
EOFError: EOF when reading a line
| N= |
s282515877 | p02572 | u500376440 | 1599667414 | Python | Python (3.8.2) | py | Runtime Error | 102 | 29720 | 415 | MAX=101010
is_prime=[True]*MAX
is_prime[0]=False
is_prime[1]=False
for i in range(2,MAX):
if is_prime[i]==False:
continue
for j in range(i*2,MAX,i):
is_prime[j]=False
a=[0]*MAX
for i in range(MAX):
if i%2==0:
continue
if is_prime[i] and is_prime[(i+1)//2]:
a[i]=1
s=[0]
for x in a:
s.append(s... | Traceback (most recent call last):
File "/tmp/tmprdqkn4ti/tmp193jhyz0.py", line 22, in <module>
Q=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s735898826 | p02572 | u658600714 | 1599648827 | Python | PyPy3 (7.3.0) | py | Runtime Error | 334 | 74456 | 139 | m = 10**9 + 7
n = input()
a = list(map(int,input().split()))
ans = 0
s = sum(a)
for i in a:
s -=i
ans += s*i
s+=i
ans = ans%m
print(ans) | File "/tmp/tmp4otjo0f5/tmp0d1slwub.py", line 8
s -=i
^
IndentationError: expected an indented block after 'for' statement on line 7
| |
s575381078 | p02572 | u658600714 | 1599648796 | Python | PyPy3 (7.3.0) | py | Runtime Error | 87 | 74576 | 145 | m = 10**9 + 7
n = input()
a = list(map(int,input().split()))
ans = 0
s = sum(a)
for i in range a:
s -=i
ans += s*i
s+=i
ans = ans%m
print(ans) | File "/tmp/tmpoafdcsc7/tmpd1i_lh27.py", line 7
for i in range a:
^
SyntaxError: invalid syntax
| |
s327667380 | p02572 | u593920359 | 1599605104 | Python | Python (3.8.2) | py | Runtime Error | 73 | 31436 | 102 | n=input()
l=list(map(int,input().split()))
s=0
for i in range(1,n):
s=s+l[i]*l[i-1]
print(s)
| Traceback (most recent call last):
File "/tmp/tmpjngcirqz/tmpz7g_eyjc.py", line 1, in <module>
n=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s958144177 | p02572 | u208588434 | 1599560014 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9004 | 204 | N = int(input())
X = list(map(int, input().split()))
p = 0
for n in range(N):
for m in range(n+1, N):
p += X[n]*X[m]
if p >= 10**9 + 7:
while p >= 10**9 + 7:
p -= 10**9 + 7
print(p) | File "/tmp/tmpxa96le_l/tmppe1faicw.py", line 8
while p >= 10**9 + 7:
IndentationError: expected an indented block after 'if' statement on line 7
| |
s995297400 | p02572 | u256709539 | 1599557060 | Python | Python (3.8.2) | py | Runtime Error | 74 | 31388 | 191 | a = [list(map(int, input().split())) for i in range(2)]
sum = 0
for i in range(1,a[1][1]):
for j in range(i+1,a[1][1]+1):
sum += a[2][i] * a[2][j]
q = 10 ** 9 + 7
print(sum % q)
| Traceback (most recent call last):
File "/tmp/tmp1ob25d45/tmpft1yo5vx.py", line 1, in <module>
a = [list(map(int, input().split())) for i in range(2)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmp1ob25d45/tmpft1yo5vx.py", line 1, in <listcomp>
a = [list(map(int, input().split())... | |
s898755884 | p02572 | u256709539 | 1599556990 | Python | Python (3.8.2) | py | Runtime Error | 69 | 31536 | 178 | a = [list(map(int, input().split())) for i in range(2)]
sum = 0
for i in range(1,n):
for j in range(i+1,n+1):
sum += a[2][i] * a[2][j]
q = 10 ** 9 + 7
print(sum % q) | Traceback (most recent call last):
File "/tmp/tmpm4lu097p/tmpig5n85nz.py", line 1, in <module>
a = [list(map(int, input().split())) for i in range(2)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmpm4lu097p/tmpig5n85nz.py", line 1, in <listcomp>
a = [list(map(int, input().split())... | |
s330253700 | p02572 | u538784937 | 1599514308 | Python | Python (3.8.2) | py | Runtime Error | 49 | 25136 | 191 | N = int(input())
list = input().split()
count = 0
for j in range(N):
for i in range(j):
count += int((list[i])%(10**9+7))*int((list[j])%(10**9+7))
print(count%(10**9+7))
| Traceback (most recent call last):
File "/tmp/tmpcf6xvmdi/tmprrxpc348.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s254322794 | p02572 | u135632715 | 1599496562 | Python | Python (3.8.2) | py | Runtime Error | 72 | 31756 | 365 | num = int(input())
data = list(map(int, input().split()))
sum = 0
for i in range(num-1):
sum = sum + data(i) * sum(data[i+1:])
print(sum)
num = int(input())
data = list(map(int, input().split()))
sum = 0
for i in range(num-1):
for j in range(1, num):
if i < j:
sum = sum + data[i] * data[j]
if len(str(sum)... | Traceback (most recent call last):
File "/tmp/tmp3zc45wha/tmpdgg587kt.py", line 1, in <module>
num = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s523784758 | p02572 | u135632715 | 1599495948 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8896 | 225 | num = int(input())
data = list(map(int, input().split()))
sum = 0
for i in range(num-1):
for j in range(1, num):
if i < j:
sum = sum + data[i] * data[j]
if len(sum) >= 10:
sum = sum % (10**9 + 7)
print(sum) | File "/tmp/tmpg7fhb72w/tmp3ay6621v.py", line 8
if len(sum) >= 10:
TabError: inconsistent use of tabs and spaces in indentation
| |
s899208973 | p02572 | u135632715 | 1599495601 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9056 | 170 | num = int(input().split())
data = list(input().split())
sum = 0
for i in range(num-1):
for j in range(1, num):
sum = sum + data[i] * data[j]
print(sum//(10**9 + 7)) | Traceback (most recent call last):
File "/tmp/tmp3fjmq_1y/tmp3flrglob.py", line 1, in <module>
num = int(input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s233082066 | p02572 | u109818844 | 1599494083 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9004 | 152 | n=int(input())
arr=list(map(int, input().split()))
m=0
for i in range(n):
for j in range(n):
if i==j:
pass
else:
m+=(i*j)
print(m) | File "/tmp/tmpkoop0hvf/tmpxli1hqsp.py", line 8
else:
TabError: inconsistent use of tabs and spaces in indentation
| |
s479325223 | p02572 | u245383302 | 1599492273 | Python | Python (3.8.2) | py | Runtime Error | 79 | 31408 | 151 | n = int(input())
List=[i for i in map(int,input().split())]
ans =0
for i in range(len(List)-1):
ans += List[i]*sum(List[i+1])
print(ans%(10**9+7))
| Traceback (most recent call last):
File "/tmp/tmp1xadexce/tmpifwzj1xy.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s016259178 | p02572 | u596797226 | 1599484904 | Python | Python (3.8.2) | py | Runtime Error | 87 | 39184 | 149 | m = int(input())
a = input().split()
tmp = sum(int(n[0])*int(n[1]) for n in set([(a[i],w) for w in a[i+1:]] for i in range(m)))
print(tmp%1000000007) | Traceback (most recent call last):
File "/tmp/tmpwwih79gy/tmp003k525l.py", line 1, in <module>
m = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s686487179 | p02572 | u596797226 | 1599484816 | Python | Python (3.8.2) | py | Runtime Error | 2252 | 1377184 | 157 | m = int(input())
a = input().split()
l = [[(a[i],w) for w in a[i+1:]] for i in range(m)]
tmp = sum(int(n[0])*int(n[1]) for n in set(l))
print(tmp%1000000007) | Traceback (most recent call last):
File "/tmp/tmpb6xljzq7/tmp16d1mav6.py", line 1, in <module>
m = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s952558342 | p02572 | u473113960 | 1599430100 | Python | Python (3.8.2) | py | Runtime Error | 70 | 31408 | 153 | MOD = 1000000007
n = int(input())
nums = list(map(int, input().split()))
x = sum(sums)
y = sum([(x[i]**2) for i in range(n)])
print(((x**2 - y)//2)% MOD) | Traceback (most recent call last):
File "/tmp/tmpq4p151vh/tmpukja36on.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s747368466 | p02572 | u310337637 | 1599417234 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8892 | 273 | n = int(input())
a = list(map(int, input().split()))
ans = 0
sum = 0
for sum_cnt in range(1, n):
sum += a[sum_cnt]
for i in range(n-1):
if i == 0:
ans += a[i]*sum
else:
sum -= a[i-1]
ans += a[i]*sum
ans = ans % (10**9 + 7)
print(ans
| File "/tmp/tmpp5reoftf/tmpr73i3anv.py", line 18
print(ans
^
SyntaxError: '(' was never closed
| |
s150487002 | p02572 | u497200058 | 1599405081 | Python | Python (3.8.2) | py | Runtime Error | 47 | 25100 | 199 | N = int(input())
Al = input().split()
A = range(N)
for i in range(Al):
A[i] = int(i)
num = 0
for i in range(N):
for j in range(i+1, N):
num += A[i]*A[j]
num = num % (10**9 + 7)
print(num) | Traceback (most recent call last):
File "/tmp/tmpirqze_cu/tmpoe9kirqt.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s050429401 | p02572 | u344813796 | 1599384212 | Python | Python (3.8.2) | py | Runtime Error | 72 | 31516 | 165 | n=int(input())
A=list(map(int,input().split()))
Ar=list(itertools.accumulate(A))
ans=0
for i in range(n-1):
ans+=A[i]*(Ar[n-1]-Ar[i])
ans%=10**9+7
print(ans) | Traceback (most recent call last):
File "/tmp/tmpt9gyzctm/tmpq2rw7syr.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s309075622 | p02572 | u693566873 | 1599378623 | Python | PyPy3 (7.3.0) | py | Runtime Error | 120 | 97660 | 235 | import sys
input = sys.stdin.readline
N = int(input())
A = map(int, input().split())
S = 0
S2 = 0
M = 10**9+7
for a in A:
S += a
S %= M
S2 += a*a
S2 %= M
# (S * S - S2)/2
ans = (S * S - S2) * pow(2, -1, M)
ans %= M
print(ans) | Traceback (most recent call last):
File "/tmp/tmpx1h4o1hx/tmp4xaky1bm.py", line 3, in <module>
N = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s830127638 | p02572 | u714852797 | 1599351000 | Python | Python (3.8.2) | py | Runtime Error | 70 | 31504 | 146 | N = int(input())
A = list(map(int, input().split()))
x = sum(A)
y = sum([A[i] ** 2 for i in range(n)])
print(((x ** 2 - y) / 2) % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpyhdr4zcm/tmpqc0wa7nf.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s966061756 | p02572 | u904811150 | 1599336624 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9116 | 182 | ans = 0
for i in range(N-1):
for j in range(i+1, N):
print(i, j)
ans += ((A[i]% (10**9 + 7))*(A[j]% (10**9 + 7))) % (10**9 + 7)
print(ans % (10**9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpjln0qcq7/tmp6d77mpji.py", line 3, in <module>
for i in range(N-1):
^
NameError: name 'N' is not defined
| |
s459841622 | p02572 | u561636464 | 1599323266 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 62356 | 420 | import numpy as np
N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
products_matrix = np.zeros((N, N))
for i in range(N):
for j in range(N):
products_matrix[i, j] = A[i] * A[j]
products_sum = 0
for k in range(N):
for l in range(N):
if l > k:
products_sum = produc... | Traceback (most recent call last):
File "/tmp/tmp_dbba6q_/tmpwx08m5x9.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s859292360 | p02572 | u561636464 | 1599323197 | Python | Python (3.8.2) | py | Runtime Error | 71 | 31644 | 401 | N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
products_matrix = np.zeros((N, N))
for i in range(N):
for j in range(N):
products_matrix[i, j] = A[i] * A[j]
products_sum = 0
for k in range(N):
for l in range(N):
if l > k:
products_sum = products_sum + products_m... | Traceback (most recent call last):
File "/tmp/tmpkc9gp29k/tmpeoghs7up.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s190660693 | p02572 | u561636464 | 1599322956 | Python | Python (3.8.2) | py | Runtime Error | 72 | 31420 | 402 | N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
products_matrix = np.zeros((N, N))
for i in range(N):
for j in range(N):
products_matrix[i, j] = A[i] * A[j]
products_sum = 0
for k in range(N):
for l in range(N):
if l > k:
products_sum = products_sum + products_m... | Traceback (most recent call last):
File "/tmp/tmp43k8js8l/tmpbss_zdrq.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s598769353 | p02572 | u561636464 | 1599322811 | Python | Python (3.8.2) | py | Runtime Error | 71 | 31700 | 397 | N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
products_matrix = np.zeros((N, N))
for i in range(N):
for j in range(N):
products_matrix[i, j] = A[i] * A[j]
products_sum = 0
for k in range(N):
for l in range(N):
if l > k:
products_sum = products_sum + products_m... | Traceback (most recent call last):
File "/tmp/tmp1gmrw_qb/tmpvzxi9tuu.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s613306612 | p02572 | u425834921 | 1599302462 | Python | Python (3.8.2) | py | Runtime Error | 76 | 31568 | 164 | N = int(input())
A = list(map(int, input().split()))
S = 0
ans
for i in range(N):
S += A[i]
for i in range(N):
ans += S * A[i]
print(ans % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmp079c9lec/tmp9dc6ta3c.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s938190311 | p02572 | u425834921 | 1599302412 | Python | Python (3.8.2) | py | Runtime Error | 72 | 31512 | 148 | N = int(input())
A = list(map(int, input().split()))
S = 0
ans
for i in range(N):
S += A[i]
for i in range(N):
ans += S * A[i]
print(ans) | Traceback (most recent call last):
File "/tmp/tmpjzd_xmvd/tmprt377j8l.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s800057376 | p02572 | u928758473 | 1599263170 | Python | Python (3.8.2) | py | Runtime Error | 158 | 50068 | 564 | import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
import nump... | Traceback (most recent call last):
File "/tmp/tmp45to1y3q/tmpzoj7vjdq.py", line 23, in <module>
main()
File "/tmp/tmp45to1y3q/tmpzoj7vjdq.py", line 13, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s463217419 | p02572 | u166414907 | 1599175711 | Python | Python (3.8.2) | py | Runtime Error | 47 | 25256 | 196 | s,t=int(input()),input()
t,j,sum=t.split(),0,0
a=list(range(100))
for i in range(s):
a[j]=int(t[i])
j=j+1
for k in range(s):
for y in range(k+1,s):
sum=sum+a[k]*a[y]
print(sum) | Traceback (most recent call last):
File "/tmp/tmpk2i9jk8u/tmptesebd3i.py", line 1, in <module>
s,t=int(input()),input()
^^^^^^^
EOFError: EOF when reading a line
| |
s685652931 | p02572 | u754869388 | 1599087738 | Python | Python (3.8.2) | py | Runtime Error | 81 | 31696 | 397 | def main():
mod = 10**9+7
#n,a = get_input()
n = int(input())
a = [int(x) for x in input().split()]
aa = [a**2 % mod for x in a]
ans = 0
asum = sum(a)
p = asum ** 2 % mod
q = sum(aa) % mod
ans = (p - q) % mod
if ans < 0:
ans += mod
if ans % 2 == 1:
ans += mod... | Traceback (most recent call last):
File "/tmp/tmpnwhmd8td/tmp3z0iq5sf.py", line 20, in <module>
main()
File "/tmp/tmpnwhmd8td/tmp3z0iq5sf.py", line 4, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s103789863 | p02572 | u244466744 | 1599069234 | Python | Python (3.8.2) | py | Runtime Error | 67 | 31420 | 194 | N = int(input())
A = list(map(int, input().split()))
sum = 0
for i in range(N):
sum_a += A[i]
for i in range(N):
sum_a -= A[i]
sum += A[i] * sum_a
ans = sum % (10**9 + 7)
print(ans)
| Traceback (most recent call last):
File "/tmp/tmp4ex57eb7/tmpsae0erun.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s575523414 | p02572 | u506907236 | 1599049413 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9188 | 187 | L=[int(x) for x in input().split()]
sum=0
product=0
mod=1000000007
for i in range(n):
sum+=L[i]%mod
for i in range(n-1):
sum-=(L[i]%mod)
product+=sum*(L[i]%mod)
print(product) | Traceback (most recent call last):
File "/tmp/tmpekfv88ts/tmp4v217jbc.py", line 1, in <module>
L=[int(x) for x in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s718037491 | p02572 | u506907236 | 1599049294 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9172 | 188 | L=[int(x) for x in input().split()]
sum=0
product=0
mod=1000000007
for i in range(n):
sum+=L[i]%mod
for i in range(n-1):
sum-=(L[i]%mod)
product+=sum*(L[i]%mod)
print(product)
| Traceback (most recent call last):
File "/tmp/tmp3bvnf8iz/tmpcijfomni.py", line 1, in <module>
L=[int(x) for x in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s216711163 | p02572 | u629246993 | 1599039904 | Python | Python (3.8.2) | py | Runtime Error | 73 | 31616 | 147 | n = int(input())
a = list(map(int, input().split()))
ans = 0
s = sum(a)-a[0]
for i in range(n-1):
ans+=(a[i]*s)
ans%=st
s-=a[i+1]
print(ans)
| Traceback (most recent call last):
File "/tmp/tmp10o71kq1/tmpl_975i1a.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s802456829 | p02572 | u923279197 | 1599034333 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9028 | 156 | n = int(input())
mod = 10**9+ 7
a = list(map(int,input().split()))
ans = (sum(a)%mod)**2 - (sum[x**2 for x in a]%mod)
ans *= 5*10**8+4
ans %= mod
print(ans) | File "/tmp/tmpvbwzg8vg/tmpgawg7m9k.py", line 4
ans = (sum(a)%mod)**2 - (sum[x**2 for x in a]%mod)
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s953157020 | p02572 | u193690465 | 1599013517 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9032 | 174 | n = input()
vals = list(map(int, input().split()))
s = sum(vals)
ret = 0
for i, val in enumerate(vals):
ret += val * (s - val)
mod = 10 ** 9 + 7
print(int(ret/2) % mod)) | File "/tmp/tmpsarpfnmv/tmpcwt03vn9.py", line 9
print(int(ret/2) % mod))
^
SyntaxError: unmatched ')'
| |
s525464401 | p02572 | u193690465 | 1599013496 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9068 | 174 | n = input()
vals = list(map(int, input().split()))
s = sum(vals)
ret = 0
for i, val in enumerate(vals):
ret += val * (s - val)
mod = 10 ** 9 + 7
print(int(ret/2) % mod)) | File "/tmp/tmpihydrk8b/tmpu6enmtoc.py", line 9
print(int(ret/2) % mod))
^
SyntaxError: unmatched ')'
| |
s321317467 | p02572 | u474212171 | 1598995407 | Python | Python (3.8.2) | py | Runtime Error | 168 | 50116 | 313 | import numpy as np
MOD = 10 ** 9 + 7
n=int(input()) #3
alst=list(map(int,input().split())) #[1,2,3]
# 累積和を求める
# 例
# [1,2,3,4,5,6]の時、累積和は、
# [0,1,3,6,10,15,21]
s=np.cumsum(alst,dtype='list')
sum=0
for i in range(len(alst)-1):
sum+=alst[i]*(s[len(s)-1]-s[i])
print(sum%MOD) | Traceback (most recent call last):
File "/tmp/tmps9m1j4fa/tmps70s51r7.py", line 5, in <module>
n=int(input()) #3
^^^^^^^
EOFError: EOF when reading a line
| |
s744396547 | p02572 | u451868485 | 1598987153 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8872 | 600 | #include<iostream>
#include<cmath>
#include<vector>
using namespace std;
const int N = 2e5+5;
const int mod = 1e9+7;
typedef long long ll ;
ll s[N],arr[N];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int num;
cin>>num;
for(int i = 1;i<=num;i++)
{
ll temp;
... | File "/tmp/tmp3fo6auue/tmpyjvnd62q.py", line 4
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s472858563 | p02572 | u097319437 | 1598978559 | Python | Python (3.8.2) | py | Runtime Error | 30 | 8656 | 248 | N = int(input)
A = [int(x) for x in input().split(" ")]
from itertools import combinations
mod = 1000000007 # 丁度いい大きさの素数だけで意味は特にない。
s = 0
for c in combinations(A, 2):
s += c[0] * c[1]
print(s % mod) | Traceback (most recent call last):
File "/tmp/tmp2je2nhns/tmply2d2ykx.py", line 1, in <module>
N = int(input)
^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'
| |
s978343792 | p02572 | u969081133 | 1598971646 | Python | Python (3.8.2) | py | Runtime Error | 2223 | 550192 | 250 | n=int(input())
array=list(map(int,input().split()))
list2=[]
for i in range(n-1):
for j in range(i+1,n):
list2.append(array[i]*array[j])
a=n*(n-1)/2
ans=0
for m in range(a):
ans=ans+list2[m]
if ans>=10**9+7:
ans=ans-(10**9+7)
print(ans) | Traceback (most recent call last):
File "/tmp/tmp45b4akxw/tmpyu4l7j3y.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s581122215 | p02572 | u969081133 | 1598971420 | Python | Python (3.8.2) | py | Runtime Error | 2223 | 549156 | 248 | n=int(input())
array=list(map(int,input().split()))
list2=[]
for i in range(n):
for j in range(i+1,n):
list2.append(array[i]*array[j])
a=n*(n-1)/2
ans=0
for m in range(a):
ans=ans+list2[m]
if ans>=10**9+7:
ans=ans-(10**9+7)
print(ans) | Traceback (most recent call last):
File "/tmp/tmppc19gyfk/tmpsfgk9_sa.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s839760183 | p02572 | u969081133 | 1598971154 | Python | Python (3.8.2) | py | Runtime Error | 2227 | 550972 | 252 | n=int(input())
array=list(map(int,input().split()))
list2=[]
for i in range(n):
for j in range(i+1,n):
list2.append(array[i]*array[j])
a=n*(n-1)
ans=0
for m in range(a):
ans=ans+list2[m]
if ans>10**9+7:
ans=ans-10**9+7
print(ans//10**9+7) | Traceback (most recent call last):
File "/tmp/tmpkq8x18x9/tmp90_jlaj1.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s782349913 | p02572 | u614381513 | 1598969593 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9084 | 324 | sus = 0
for i in a:
su = su - i
sus = sus + i * su
"""comb = len(a) * (len(a) - 1) / 2
comb = int(comb)
sum = 0
la = len(a)
for i in range(comb):
#print(a)
for j in range(1, la):
#print(a[i])
sum = sum + a[0] * a[i]
a = a[1:]
la = la - 1
#print(a)"""
print(sus % (10**9 +... | Traceback (most recent call last):
File "/tmp/tmp3wmkgrhh/tmpbf9prtre.py", line 3, in <module>
for i in a:
^
NameError: name 'a' is not defined
| |
s716046544 | p02572 | u949327459 | 1598965785 | Python | Python (3.8.2) | py | Runtime Error | 70 | 31652 | 228 | N = int(input())
A = list(map(int,input().split()))
A = A % (1*10**9 + 7)
value = 0
plus = 0
ans = 0
for i in range(N-1):
for j in range(N-i-1):
value = (A[i]*A[i+j+1]+value) % (1*10**9 + 7)
print(value)
| Traceback (most recent call last):
File "/tmp/tmprigqxq7e/tmpcvlgln4t.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s967417387 | p02572 | u632395989 | 1598960435 | Python | Python (3.8.2) | py | Runtime Error | 74 | 31604 | 286 | N = int(input())
A = list(map(int, input().split()))
B = [] # 累積和テーブル B[i] = sum(A[:i])
mod = 10**9 + 7
ans = 0
for i in range(N):
B[i+1] = B[i] + A[i] # 累積和
for i in range(N):
sum = (B[N] - B[i+1]) % mod
ans += A[i] * sum
ans %= mod
print(ans)
| Traceback (most recent call last):
File "/tmp/tmps027e84u/tmpztkt17jc.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s889251581 | p02572 | u632395989 | 1598960084 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8832 | 286 | N = int(input())
A = list(map(int, input().split())
B = [] # 累積和テーブル B[i] = sum(A[:i])
mod = 10**9 + 7
ans = 0
for i in range(N+1):
B.append(sum(A[:i])) # 累積和
for i in range(N):
sum = (B[N] - B[i+1]) % mod
ans += A[i] * sum
ans %= mod
print(ans) | File "/tmp/tmprjtilybv/tmp8s1j1m04.py", line 2
A = list(map(int, input().split())
^
SyntaxError: '(' was never closed
| |
s408213702 | p02572 | u695197008 | 1598941770 | Python | Python (3.8.2) | py | Runtime Error | 46 | 25244 | 164 | N = int(input())
A = map(int, input().split())
MOD = 10**9 + 7
total = 0
for i in range(N):
for j in range(i+1, N):
total += A[i] * A[j]
print(total % MOD) | Traceback (most recent call last):
File "/tmp/tmpvy0yx_rt/tmp4463vbk3.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s026311582 | p02572 | u710282484 | 1598917242 | Python | PyPy3 (7.3.0) | py | Runtime Error | 89 | 74648 | 196 | n=input()
m=0
from itertools import combinations
b=combinations
a=b(map(int,input().split()),2)
for i,j in a:
k=i*j
m+=k
if m<=MOD:
print(m)
else:
MOD=10**9+7
v=m%MOD
print(v) | File "/tmp/tmpnsbeo8if/tmpms0zrdhm.py", line 13
v=m%MOD
^
IndentationError: unindent does not match any outer indentation level
| |
s245257111 | p02572 | u606090886 | 1598916242 | Python | Python (3.8.2) | py | Runtime Error | 73 | 31624 | 206 | n = int(input())
a = list(map(int,input().split()))
pans = 0
sum_ = sum(a)%(10**9+7)
for i in range(n-1):
sum -= a[i]
ans = sum * a[i]
ans = ans % (10**9+7)
pans += ans
print(pans%(10**9+7)) | Traceback (most recent call last):
File "/tmp/tmph1ht72ws/tmpyx32upky.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s916522971 | p02572 | u909224749 | 1598911928 | Python | Python (3.8.2) | py | Runtime Error | 117 | 31644 | 266 | #標準入力
N = int(input())
A = list(map(int, input().split()))
#累積和
S = [0]*N
for n in range(N):
S[n] = S[n-1] + A[n]
_sum = int(0)
for i in range(N-1):
_sum = _sum + int((A[i] * (S[N] - S[i])))
#modulo
_sum = _sum % (1000000000+7)
print(_sum) | Traceback (most recent call last):
File "/tmp/tmp9pum_fe6/tmpb7nctw4t.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s381277308 | p02572 | u909224749 | 1598911712 | Python | Python (3.8.2) | py | Runtime Error | 110 | 31576 | 258 | #標準入力
N = int(input())
A = list(map(int, input().split()))
#累積和
S = [0]*N
for n in range(N):
S[n] = S[n-1] + A[n]
_sum = 0
for i in range(N-1):
_sum = _sum + (A[i] * (S[N] - S[i+1]))
#modulo
_sum = _sum % (1000000000+7)
print(_sum) | Traceback (most recent call last):
File "/tmp/tmp2q06ugvg/tmph7s181s2.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s444512003 | p02572 | u909224749 | 1598911614 | Python | Python (3.8.2) | py | Runtime Error | 117 | 31384 | 251 | #標準入力
N = int(input())
A = list(map(int, input().split()))
#累積和
S = [0]*N
for n in range(N):
S[n] = S[n-1] + A[n]
_sum = 0
for i in range(N-1):
_sum = _sum + (A[i] * (S[N] - S[i+1]))
_sum = _sum % (1000000000+7)
print(_sum) | Traceback (most recent call last):
File "/tmp/tmpwh4qbzft/tmpjq7oo_no.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s803683852 | p02572 | u909224749 | 1598911558 | Python | Python (3.8.2) | py | Runtime Error | 114 | 31600 | 248 | #標準入力
N = int(input())
A = list(map(int, input().split()))
#累積和
S = [0]*N
for n in range(N):
S[n] = S[n-1] + A[n]
_sum = 0
for i in range(N-1):
_sum = _sum + (A[i] * (S[N] - S[i+1]))
_sum = _sum % (1000000000+7)
print(_sum)
| Traceback (most recent call last):
File "/tmp/tmpwfuwglxa/tmpbnc071e9.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s221764289 | p02572 | u617384447 | 1598908891 | Python | PyPy3 (7.3.0) | py | Runtime Error | 94 | 74368 | 154 | N = int(input())
nums = list(map(int, input().split()))
def square(x):
return x * x
out = (square(sum(nums)) - sum(map(square, nums))) / 2
return out | File "/tmp/tmpe1e6jijh/tmp_uofni82.py", line 9
return out
^^^^^^^^^^
SyntaxError: 'return' outside function
| |
s037317328 | p02572 | u332135290 | 1598900527 | Python | Python (3.8.2) | py | Runtime Error | 128 | 31252 | 285 | import itertools
N = int(input())
A = list(int(x) for x in input().split())
mod = 10**9+7
ans = 0
summ = 0
for i in range(N):
summ += A[i]
summ %= mod
for i in range(N):
summ -= A[i]
if summ < 0:
sum += mod
ans += A[i] * summ
ans %= mod
print(ans)
| Traceback (most recent call last):
File "/tmp/tmp4dysk05_/tmpaol53sw8.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s284026368 | p02572 | u332135290 | 1598900449 | Python | Python (3.8.2) | py | Runtime Error | 147 | 31336 | 285 | import itertools
N = int(input())
A = list(int(x) for x in input().split())
mod = 10**9+7
ans = 0
summ = 0
for i in range(N):
summ += A[i]
summ %= mod
for i in range(N):
summ -= A[i]
if summ < 0:
sum += mod
ans += A[i] * summ
ans %= mod
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpzqqisa4i/tmped4xrgg9.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s881907730 | p02572 | u332135290 | 1598900418 | Python | Python (3.8.2) | py | Runtime Error | 302 | 31648 | 330 | import itertools
N = int(input())
A = list(int(x) for x in input().split())
mod = 10**9+7
ans = 0
summ = 0
for i in range(N):
summ += A[i]
summ %= mod
for i in range(N):
summ -= A[i]
print(summ)
if summ < 0:
sum += mod
ans += A[i] * summ
print(ans)
ans %= mod
print(ans)
p... | Traceback (most recent call last):
File "/tmp/tmp17jr_8ji/tmpvq96vnjp.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s105677981 | p02572 | u909224749 | 1598895261 | Python | Python (3.8.2) | py | Runtime Error | 130 | 44008 | 224 | import numpy as np
N = int(input())
A = np.array(map(int, input().split()))
A %= (1000000000+7)
_sum = 0
for n in range(N-1):
for i in range(n+1):
_sum += A[n+1] * A[i]
_sum %= (1000000000+7)
print(_sum) | Traceback (most recent call last):
File "/tmp/tmpdsm5aj3y/tmpc163i7nn.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s549552930 | p02572 | u909224749 | 1598895208 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8960 | 223 | import numpy as np
N = int(input())
A = np.array(map(int, input().split()))
A %= (1000000000+7)
_sum = 0
for n in range(N-1):
for i in range(n+1):
_sum += A[n+1] * A[i]
_sum = %= (1000000000+7)
print(_sum) | File "/tmp/tmp0ao3lp9e/tmp9py285ga.py", line 12
_sum = %= (1000000000+7)
^^
SyntaxError: invalid syntax
| |
s452684092 | p02572 | u423137719 | 1598889148 | Python | PyPy3 (7.3.0) | py | Runtime Error | 124 | 105616 | 136 | n = int(input())
lt = [int(x) for x in input().split()]
s = sum(lt)
ans = 0
for a in lt:
s = s - a
ans+= (a*s)%mod
print(ans%mod) | Traceback (most recent call last):
File "/tmp/tmps9l28jkh/tmpzntklmmn.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s222152804 | p02572 | u907865484 | 1598883851 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8644 | 236 | MOD = 1000000007
N = input()
n_list = list(map(int,input().split()))
print(n_list)
result = 0
for i in range(n):
for j in range(n-i-1)
result += n_list[i] * n_list[j+1] % MOD
result = result % MOD
print(result)
| File "/tmp/tmpmi7ceish/tmpzleiqed8.py", line 11
for j in range(n-i-1)
^
SyntaxError: expected ':'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.