s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s818348097 | p03698 | u952022797 | 1565020170 | Python | PyPy3 (2.4.0) | py | Runtime Error | 180 | 38640 | 671 | # -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
import random
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics impo... |
s336244223 | p03698 | u556589653 | 1560533693 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | N = int(input())
A = list(map(int,input().split()))
Ma = max(A)
Mi = min(A)
print(Ma-Mi) |
s563989095 | p03698 | u561870477 | 1559511275 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 60 | s = input()
print("yes" if len(s) = len(set(s))) else "not") |
s618810318 | p03698 | u159312112 | 1559002600 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 84 |
S= input()
B=set(S)
if len(S)==len(B):
print("yes")
else:
print("no")
|
s232464049 | p03698 | u507116804 | 1557707228 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 90 | s=input()
k=list(s)
m=list(set(l))
if len(k)==len(m):
print("yes")
else:
print("no") |
s529491012 | p03698 | u722189950 | 1557018948 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 198 | #ABC063B
S = input()
all_dif = True
for i in range(len(S)):
for j in range(i+1, len(S)):
if S[i] == S[i+j]:
all_dif = False
if all_dif:
print("yes")
else:
print("no") |
s109555521 | p03698 | u969190727 | 1555295917 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 100 | s=input()
S=[]
for i in range(len(s)):
S.append(s[i])
print("yes" if len(setS))==len(s) else "No") |
s570065658 | p03698 | u859897687 | 1554209753 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 112 | s=input()
a={}
ans="yes"
for i in range(len(s)):
if s[i] in a:
ans="no"
break
a.add(s[i])
print(ans) |
s795918109 | p03698 | u859897687 | 1554209661 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 111 | s=input()
a={}
ans="yes"
for i in range(len(s)):
if s[i] in a:
ans="no"
break
a=a|{s[i]}
print(ans) |
s519518122 | p03698 | u859897687 | 1554209494 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 110 | s=input()
a={}
ans="yes"
for i in range(len(s)):
if s[i] in a:
ans="no"
break
a+={s[i]}
print(ans) |
s040331377 | p03698 | u878138257 | 1553839831 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 115 | s = input()
a = 0
for i in range(len(s)):
a = a + s.count(s[i])
if a = len(s):
print("yes")
else:
print("no") |
s408127232 | p03698 | u366959492 | 1553440908 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 64 | n=input()
l=list(map(int,input().split()))
print(max(l)-min(l))
|
s556664834 | p03698 | u393512980 | 1553047983 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3316 | 113 | s=input()
from collections import Counter
c=Counter(s)
if most_common(c)[0]>1:
print("no")
else:
print("yes") |
s386991579 | p03698 | u465669072 | 1553031034 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | n = input()
m = list(n.copy)
#print(m)
if len(set(m)) == len(m):
print("yes")
else:
print("no")
|
s190338542 | p03698 | u212641126 | 1551306268 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 62 | a,b=map(int,input().split())
print(a+b if a+b<10 else "error") |
s560051131 | p03698 | u794173881 | 1551040491 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 133 | s = input()
ss = set(s)s = input()
li_s = list(s)
li_ss= list(set(s))
if len(li_s)==len(li_ss):
print("yes")
else:
print("no") |
s070914581 | p03698 | u023229441 | 1550194793 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 131 | s=input()
for i in range(len(s)-1):
for j in range(i+1,len(s)+1):
if s[i]==s[j]:
print("no")
exit()
print("yes")
|
s279500971 | p03698 | u023229441 | 1550194741 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 130 | s=input()
for i in range(len(s)-1):
for j in range(i+1,len(s)+1):
if A[i]==A[j]:
print("no")
exit()
print("yes") |
s359658664 | p03698 | u492030100 | 1550151328 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 67 | S=[for i in input()]
print('yes' if len(S)==len(set(S)) else 'no')
|
s517415596 | p03698 | u619819312 | 1547706833 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 55 | print("no"if len(set(input()))!=len(input()) else"yes") |
s295275910 | p03698 | u445511055 | 1545440477 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 262 | # -*- coding: utf-8 -*-
def main():
"""Function."""
s = str(input())
check = set()
for i in range(s):
check.add(s[i])
if len(s) != len(s):
print("no")
else:
print("yes")
if __name__ == "__main__":
main()
|
s324591980 | p03698 | u102960641 | 1540869053 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 152 | s = input()
a = [i for i in s]
s = sorted(a)
b = 1
for i in range(len(s)-1):
if s[i] == s[i+1]:
b = 0
print("yes") if b = 1 else print("no")
|
s982038390 | p03698 | u102960641 | 1540868963 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 161 | s = input()
a = [i for i in s]
s = sorted(a)
b = 1
for i in range(len(s)-1):
if s[i] == s[i+1]:
b = 0
break
print("yes") if b = 1 else print("no")
|
s349148560 | p03698 | u320325426 | 1538778044 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 69 | s = [i for i in input()]
print("yes" len(s) == len(set(s)) else "no") |
s851972549 | p03698 | u940102677 | 1538380497 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 62 | s = list(input())
if("yes" if len(s) == len(set(s)) else "no") |
s077138793 | p03698 | u457901067 | 1535979909 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | S = input()
li = set()
for i in len(S):
li.add(S[i])
if len(S) == len(li):
print("yes")
else:
print("no") |
s631827123 | p03698 | u790301364 | 1535123338 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3184 | 290 | def main11():
str = input("");
flag = True;
for i in range((len(str)-1)):
for j in range(i+1,len(str)):
if(str[i]==str[j]):
flag = False;
if flag:
print(yes);
else:
print(no);
if __name__ == '__main__':
main11() |
s270550796 | p03698 | u366644013 | 1532922986 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 72 | s = input()
if s == str((set(s)):
print("yes")
else:
print("no") |
s861763608 | p03698 | u039623862 | 1525735166 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 79 | s = [x for x in input()]
print('yes' if all(s.count(c)==1 for c in s else 'no') |
s060558825 | p03698 | u748135969 | 1518464467 | Python | Python (3.4.3) | py | Runtime Error | 24 | 2940 | 113 | s = input()
s_num = len(s)
for i in range(s_num):
if s[i] == s[i + 1]:
print("no")
else:
print("yes") |
s717993899 | p03698 | u966000628 | 1510302574 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 122 | S = raw_input()
lis = list(S)
for i in lis:
mat = []
if i in S:
print "no"
break
mat.append(i)
else:
print "yes" |
s701420157 | p03698 | u966000628 | 1510302439 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 119 | S = raw_input()
lis = list(S)
for i in lis:
mat = []
if i in S
print "no"
break
mat.append(i)
else:
print "yes" |
s627514719 | p03698 | u966000628 | 1510302346 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 116 | S = raw_input()
lis = list(S)
for i in lis:
mat = []
if i in S
print "no"
break
mat.add(i)
else:
print "yes" |
s709496769 | p03698 | u966000628 | 1510302257 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 115 | S = raw_input()
mat = []
lis = list(S)
for i in lis:
if i in S
print "no"
break
mat.add(i)
else:
print "yes" |
s953083584 | p03698 | u865646085 | 1510010478 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 114 | import sys
s = input().rstrip()
if len(s) == len(set(list(s))):
print(“yes\n”)
else:
print(“no\n”) |
s041411071 | p03698 | u865646085 | 1510010430 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 123 | import sys
s = sys.stdin.read().rstrip()
if len(s) == len(set(list(s))):
print(“yes\n”)
else:
print(“no\n”) |
s041170246 | p03698 | u865646085 | 1510010409 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 119 | import sys
s = sys.stdin.read().rstrip()
if len(s) == len(set(list(s))):
print(“yes”)
else:
print(“no”) |
s047167294 | p03698 | u526532903 | 1501771301 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 213 | a = input()
ls = {}
for i in range(ord('a'), ord('z')):
ls[chr(i)] = 0
for i in a:
ls[i]+=1;
f = 1;
for i in a:
if ls[i] > 1:
f = 0
break
if f:
print("yes")
else:
print("no")
|
s045989864 | p03698 | u343437894 | 1499639402 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 169 | s = input()
str=[]
for char in s:
str.append(char)
str.sort()
for char in str:
if str.count(char) > 1:
print "no"
break
else:
print "yes"
|
s926970033 | p03698 | u767655833 | 1498624962 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3444 | 147 | import sys
from collections import Counter
print('yes' if all([True if x <= 1 else False for x in list(Counter(sys.argv[1]).values())]) else 'no') |
s330476747 | p03698 | u916877812 | 1497320324 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 169 | s=list(input())
s.sort()
j=0
if len(s) == 1:j=0
else: j=1
for i in s:
if j == len(s)-1:print("yes")
break
if i == s[j]:print("no")
break
j+=1 |
s087036180 | p03698 | u517754855 | 1496971222 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 116 | s = str(input())
f = "yes"
for i in range(0,len(s)):
if s.count(i) != 1:
f = "no"
break
print(f) |
s154033291 | p03698 | u886545507 | 1496575465 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 91 | #ABC063B
s=raw_input()
l1=len(s)
l2=len(set(s))
if li==l2:
print 'yes'
else:
print 'no'
|
s639845567 | p03698 | u897575257 | 1496542408 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 444 | 文字列を取り込む。
文字数を数える。
文字列をソートする。
最初の文字と二番目の文字が同じかどうか確認する。
同じならば'NO'を出力する。
違うならば二番目の文字列と三番目の文字列が同じかどうか確認する。
同じならば'NO'を出力する。
・
・
・
最後から一つ前の文字と最後の文字を確認して違うならば
'YES'を出力する。 |
s281680443 | p03698 | u768816323 | 1496541028 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 165 | S=list(input())
sorted(S)
nd=0
while nd==0 and i<len(S):
if S[i]==S[i+1]:
nd=1
i+=1
if nd==1:
print ("no")
else:
print ("yes")
|
s743587032 | p03698 | u813098295 | 1496539376 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 98 | s = raw_input()
ans = "yes"
for i in s:
if s.count(s[i]) != 1:
ans = "no"
print ans |
s385605935 | p03698 | u330205771 | 1496538827 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 200 | = list(map(str, raw_input().split())[0])
S.sort()
flag = True
for i in range(len(S) - 1):
if S[i] == S[i + 1]:
flag = False
break
if flag:
print("yes")
else:
print("no") |
s224593026 | p03698 | u019578976 | 1496538617 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 122 | s = input()
ans=0
for i in range(len(s)):
if s[i] == s[i+1]:
ans += 1
if ans > 0:
print("no")
else:
print("yes") |
s009258793 | p03699 | u017603316 | 1601268188 | Python | PyPy3 (7.3.0) | py | Runtime Error | 178 | 68032 | 346 | import itertools
N = int(input())
s = []
for i in range(N):
s.append(int(input()))
sei=0
s = sorted(s)
total = sum(s)
flg=0
if total%10!=0:
out=total
flg=1
else:
scr=total
for i in range(N):
if S[i] %10!=0:
print(sum(S)-S[i])
break
elif i==N-1:
p... |
s923921772 | p03699 | u006880673 | 1601163684 | Python | PyPy3 (7.3.0) | py | Runtime Error | 78 | 68760 | 162 | N=int(input())
s=[int(input()) for _ in range(N)]
ss = [s[i] for i in range(N) if s[i]%10!=0]
if sum(s)%10 != 0:
print(sum(s))
else:
print(sum(s)-min(ss)) |
s391034467 | p03699 | u244466744 | 1600820024 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9080 | 220 | N = int(input())
S = []
for i in range(N):
S.append(int(input()))
S.sort()
ans = sum(S)
if ans % 10 != 0:
print(ans)
for i in range(N):
if A[i] % 10 != 0:
ans -= a[i]
print(ans)
exit()
print(0) |
s744094743 | p03699 | u244466744 | 1600819353 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9116 | 174 | N = int(input())
S = []
for i in range(N):
S.append(input())
S.sort()
ans = sum(S)
for i in range(N):
if ans % 10 == 0:
ans -= S[i]
else:
print(ans)
|
s012372334 | p03699 | u244466744 | 1600819145 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9104 | 187 | N = int(input())
S = []
for i in range(N):
S.append(input())
S.sort(reverse = True)
ans = sum(S)
for i in range(N):
if ans % 10 == 0:
ans -= S[i]
else:
print(ans) |
s672183089 | p03699 | u010777300 | 1600014248 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8740 | 269 | n = int(input())
x = 0
mn = 101
for i in range(n):
s = int(input())
x += s
if x % 10 != 0
if s < mn:
mn = s
if x % 10 != 0:
print(x)
else:
x -= mn
if x % 10 == 0:
print(0)
else:
if x < 0:
print(0)
exit()
print(x)
|
s457976870 | p03699 | u010777300 | 1600014139 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8896 | 317 | n = int(input())
x = 0
mn = 101
for i in range(n):
s = int(input())
x += s
if x % 10 != 0
if s < mn:
mn = s
if x % 10 != 0:
print(x)
else:
x -= mn
if x % 10 == 0:
print(0)
else:
if x < 0:
print(0)
exit()
print(x)
|
s875115111 | p03699 | u999503965 | 1599531651 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9160 | 240 | n=int(input())
l=[int(input()) for i in range(n)]
l_5=[i for i in l if i%5==0 and i%10!=0]
l_10=[i for i in l if i%10==0]
sum_l=sum(l)
if sum_l%10!=0:
print(sum_l)
else:
if len(l_10)==n:
print(0)
else:
print(sum_l-min(l_5)) |
s686475206 | p03699 | u244836567 | 1599402035 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8828 | 204 | a=int(input())
b=[int(input()) for i in range(a)]
b.sort()
c=sum(b)
d=0
if c%10!=0:
print(c)
else:
for i in range(a):
if b[i]%!=0:
d=c-b[i]
print(d)
break
if d==c:
print(0) |
s492051241 | p03699 | u244836567 | 1599402021 | Python | Python (3.8.2) | py | Runtime Error | 19 | 8964 | 200 | a=int(input())
b=[int(input()) for i in range(a)]
b.sort()
c=sum(b)
if c%10!=0:
print(c)
else:
for i in range(a):
if b[i]%!=0:
d=c-b[i]
print(d)
break
if d==c:
print(0) |
s090061088 | p03699 | u244836567 | 1598827663 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8828 | 163 | a=int(input())
b=[int(input()) for i in range(a)]
b.sort()
c=sum(b)
if c%10!==0:
print(c)
else:
while c%10==0:
for k in range(a):
c=c-b[k]
print(c) |
s749972235 | p03699 | u252828980 | 1598493337 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9132 | 313 | n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
print(sum1)
exit()
i = 0
while sum1%10==0:
if L[i] %10 != 0:
sum1 -= L[i]
if sum1 < 0:
sum1 = 0
break
if not L:
print(0)
exit()
i +=1
print(sum1) |
s823354897 | p03699 | u252828980 | 1598493316 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9164 | 332 | n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
print(sum1)
exit()
i = 0
if not L:
print
while sum1%10==0:
if L[i] %10 != 0:
sum1 -= L[i]
if sum1 < 0:
sum1 = 0
break
if not L:
print(0)
exit()
i +=1... |
s008420429 | p03699 | u252828980 | 1598493216 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9092 | 254 | n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
print(sum1)
exit()
i = 0
while sum1%10==0:
if L[i] %10 != 0:
sum1 -= L[i]
if sum1 < 0:
sum1 = 0
break
i +=1
print(sum1) |
s906123351 | p03699 | u252828980 | 1598493125 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9084 | 243 | n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
print(sum1)
exit()
i = 0
while sum1%10==0:
if L[i] %10 != 0:
sum1 -= L[i]
sum1 = max(sum1,abs(sum1))
break
i +=1
print(sum1) |
s384227222 | p03699 | u252828980 | 1598493019 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9180 | 208 | n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
print(sum1)
exit()
i = 0
while sum1%10==0:
if L[i] %10 != 0:
sum1 -= L[i]
break
i +=1
print(sum1) |
s051232483 | p03699 | u252828980 | 1598492767 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9188 | 202 | n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
print(sum1)
exit()
i = 0
while sum1%10==0:
sum1 -= L[i]
if sum1 < 0:
sum1 = 0
i +=1
print(sum1) |
s583008581 | p03699 | u252828980 | 1598492712 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9164 | 168 | n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
print(sum1)
exit()
i = 0
while sum1%10==0:
sum1 -= L[i]
i +=1
print(sum1) |
s654961719 | p03699 | u252828980 | 1598492623 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9104 | 168 | n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
print(sum1)
exit()
i = 0
while sum1%10==0:
sum1 -= L[i]
i +=1
print(sum1) |
s491524815 | p03699 | u252828980 | 1598492506 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9204 | 190 | n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
print(sum1)
exit()
else:
i = 0
while sum1%10==0:
sum1 -= L[i]
i +=1
print(sum1) |
s291329739 | p03699 | u773686010 | 1598449747 | Python | Python (3.8.2) | py | Runtime Error | 87 | 17076 | 294 | N = int(input())
dp = [[0]*(N + 1)*100 for i in range(N + 1)]
for i in range(1,N+1):
cs = int(input())
dp[i][cs] = cs
U_List = [k for k, x in enumerate(dp[i-1]) if x != 0]
for j in U_List:
dp[i][j+cs] = j + cs
print(max([k for k, x in enumerate(dp[-1]) if x % 10 != 0])) |
s291438430 | p03699 | u694665829 | 1598280214 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9176 | 291 | n=int(input())
tens=[]
others=[]
for i in range(n):
s=int(input())
if s%10==0:
tens.append(s)
else:
others.append(s)
tens.sort(reverse=True)
others.sort(reverse=True)
score=sum(tens)+sum(others)
if score%10==0:
print(score-min(others))
else:
print(score) |
s343579472 | p03699 | u074220993 | 1597972609 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9144 | 359 | N = int(input())
maxs = 0
s = []
for i in range(N):
cin = int(input())
s.append(cin)
maxs = max(maxs, cin)
M = maxs * N + 1
dp = [False * M]
dp[0] = True
for x in s:
for i in range(M):
if i < x: continue
if dp[i-x]: dp[i] = True
for i in range(M):
if (M-i)%10 != 0 and dp[M-i]:... |
s772305847 | p03699 | u074220993 | 1597972531 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9140 | 363 | N = int(input())
maxs = 0
s = []
for i in range(N):
cin = int(input())
s.append(cin)
maxs = max(maxs, cin)
M = maxs * N + 1
dp = [False * M]
dp[0] = True
for x in s:
for i in range(M+1):
if i < x: continue
if dp[i-x]: dp[i] = True
for i in range(M+1):
if (M-i)%10 != 0 and dp[M... |
s527051929 | p03699 | u600261652 | 1597890726 | Python | Python (3.8.2) | py | Runtime Error | 2268 | 1684172 | 253 | import itertools
N = int(input())
S = [int(input()) for _ in range(N)]
cos = []
for i in list(itertools.product([0,1], repeat=N)):
ans = 0
for j in range(N):
if i[j] == "1":
ans += S[j]
if ans%10 != 0:
cos.append(ans)
print(max(cos)) |
s580736331 | p03699 | u869790980 | 1597551564 | Python | PyPy2 (7.3.0) | py | Runtime Error | 61 | 64228 | 252 | n = int(raw_input())
r,cumul, ais, m = 0, 0, [int(raw_input()) for _ in range(n)],+float('inf')
for ai in ais:# in range(0, len(ais)):
cumul += ai
m = min(m, ais[i] if ai % 10 else +float('inf'))
r = max(r, cumul - (m if cumul % 10 else 0))
print r |
s921760308 | p03699 | u869790980 | 1597550986 | Python | PyPy2 (7.3.0) | py | Runtime Error | 364 | 84284 | 244 | n ais = [int(raw_input())] + map(int, raw_input().split())
r = 0
cumul = 0
m = +float('inf')
for i in range(1, len(ais)):
cumul += ais[i]
if cumul % 10 == 0:
r = max(r, cumul - m)
else:
m = min(m, ais[i])
r = max(r, cumul)
print r |
s863775747 | p03699 | u045953894 | 1597467510 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9132 | 348 | n = int(input())
s = []
for i in range(n):
s += [int(input())]
if sum(s) % 10 != 0:
print(sum(s))
else:
a = []
for i in range(n):
a += [s[i]]
if a[i] % 10 != 0 and (sum(s) - sum(a)) % 10 != 0:
print(sum(s) - sum(a))
f = 0
exit()
else:
... |
s398586300 | p03699 | u045953894 | 1597467293 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9208 | 329 | n = int(input())
s = []
for i in range(n):
s += [int(input())]
if sum(s) % 10 != 0:
print(sum(s))
else:
a = []
for i in range(n):
a += [s[i]]
if (sum(s) - sum(a)) % 10 != 0:
print(sum(s) - sum(a))
f = 0
exit()
else:
f = 1
if f:
... |
s708832414 | p03699 | u679089074 | 1596695363 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9180 | 209 | #16
n = int(input())
s = [int(input()) for i in range(n)]
Max = sum(s)
s = list(set(s))
if Max%10 ==0:
for i in range(n):
Max -= s[i]
if Max%10 !=0:
break
print(Max) |
s154877833 | p03699 | u377834804 | 1595952559 | Python | PyPy3 (7.3.0) | py | Runtime Error | 95 | 74736 | 217 | N = int(input())
S = soted([int(input()) for _ in range(N)])
m = 0
for s in S:
if s % 10 != 0 and m == 0:
m = s
break
ans = sum(S)
if ans % 10 != 0:
print(ans)
elif m != 0:
print(ans-m)
else:
print(0) |
s432243600 | p03699 | u633450100 | 1595463612 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9020 | 193 | N = int(input())
score = []
for i in range(N):
x = int(input())
score.append(x)
pai = sum(score)
score.sort()
i = 0
while pai % 10 == 0:
pai -= score[i]
i += 1
print(pai)
|
s881332933 | p03699 | u940139461 | 1595454226 | Python | PyPy3 (7.3.0) | py | Runtime Error | 128 | 73984 | 282 | mport sys
n = int(input())
nums = []
for _ in range(n):
nums.append(int(input()))
s = sum(nums)
if s % 10 != 0:
print(s)
else:
nums.sort()
for num in nums:
t = s - num
if t % 10 != 0:
print(t)
break
else:
print(0) |
s500421144 | p03699 | u968404618 | 1594958148 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9172 | 258 | n = int(input())
s = list(int(input()) for i in range(n))
ans = sum(S)
sort_S = sorted(S)
if ans % 10 != 0:
print(ans)
exit()
else:
for s in sort_S:
if s % 10 != 0:
ans -= s
print(ans)
exit()
print(0) |
s313250357 | p03699 | u185806788 | 1594866539 | Python | PyPy3 (7.3.0) | py | Runtime Error | 86 | 74448 | 117 | N=int(input())
A=[int(input()) for i in range(N)]
X=sum(A)
A.sort(reverse=True)
while X%10==0:
X=X-A.pop()
print(X) |
s819274315 | p03699 | u065099501 | 1594845829 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8976 | 246 | n=int(input())
a = [int(input()) for _ in range(n)]
ans=0
a.sort()
for i in range(n+1):
if sum(a)%10 == 0:
if a[i]%10 == 0:
continue
else:
a[i]=0
else:
print(sum(a))
exit(0)
print(0) |
s624985660 | p03699 | u763280125 | 1594777772 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9176 | 224 | import sys
N = int(input())
S = [int(input()) for _ in range(N)]
S.sort()
t = sum(S)
if t % 10 != 0:
print(t)
sys.exit()
for s in range(S):
if (t - s) % 10 != 0:
print(t - s)
sys.exit()
print(0)
|
s959030865 | p03699 | u188827677 | 1593447008 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9176 | 193 | n = int(input())
s = [int(input()) for _ in range(n)]
sumNum = sum(s)
if sumNum % 10 != 0:
print(sumNum)
exit()
t = 0
for i in s:
if (sumNum - i)%10 != 0:
t = max(t, sum-i)
print(t) |
s373760138 | p03699 | u750651325 | 1592255592 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 242 | N = int(input())
S = []
for i in range(N):
s = int(input())
S.append(s)
a = sum(S)
if a % 10 != 0:
print(a)
else:
T = [s for s in S if s%10!=0]
if len(T) == 0:
ans = 0
else:
ans = a-min(T)
print(ans) |
s582969759 | p03699 | u750651325 | 1592255557 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 260 | import itertools
N = int(input())
S = []
for i in range(N):
s = int(input())
S.append(s)
a = sum(S)
if a % 10 != 0:
print(a)
else:
T = [s for s in S if s%10!=0]
if len(T) == 0:
ans = 0
else:
ans = A-min(T)
print(ans) |
s781732070 | p03699 | u545644875 | 1591991511 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 350 | N = int(input())
S = [int(input()) for i in range(N)]
S.sort()
max_ans = sum(S)
if N == 1:
if max_ans % 10 == 0:
print(0)
exit(0)
else:
print(max_ans)
exot(0)
if max_ans % 10 == 0:
i = 0
while S[i] % 10 == 0:
i += 1
if i == N-1:
print(0)
exit(0)
ans = max_ans - S[i]
pri... |
s234145968 | p03699 | u545644875 | 1591990438 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 251 | N = int(input())
S = [int(input()) for i in range(N)]
S.sort()
max_ans = sum(S)
if max_ans % 10 == 0:
i = 0
while S[i] % 10 == 0:
i += 1
if i == N-1:
print(0)
exit(0)
ans = max_ans - S[i]
print(ans)
else:
print(max_ans) |
s467823484 | p03699 | u244416620 | 1590962253 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 270 | n = int(input())
s = []
for i in range(n):
s.append(int(input()))
ss = sum(s)
if ss % 10 == 0:
# sの中で10で割り切れない最小の数を引けば良い
s.sort()
m = [t for t in s if t%10!=0]
if len(m) == 0:
print(0)
else:
print(ss-min(m)) |
s631321992 | p03699 | u244416620 | 1590961763 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 300 | def minus_min(s):
sum(s)-min(s)
n = int(input())
s = []
for i in range(n):
s.append(input())
ss = sum(s)
if ss % 10 == 0:
# sの中で10で割り切れない最小の数を引けば良い
s.sort()
m = [t for t in s if t%10!=0]
if len(m) == 0:
print(0)
else:
print(ss-min(m))
|
s007429320 | p03699 | u357949405 | 1590419255 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 196 | N = int(input())
s = []
t = []
for _ in range(N):
tmp = int(input())
s.append(tmp)
if tmp % 10 != 0:
t.append(tmp)
ans = sum(s)
if s % 10 != 0:
print(ans)
else:
print(ans - min(t)) |
s611771519 | p03699 | u488178971 | 1589940503 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 260 | N = int(input())
S = []
for i in range(N):
S.append(int(input()))
not_b10 = sorted([s for s in S if s%10 != 0])
b10 = sorted([s for s in S if s%10 == 0])
if sum(S)%10!=0:
print(sum(S))
elif S ==b10:
print(0)
else:
print(sum(S)-not_b10[0]) |
s285129437 | p03699 | u493130708 | 1589695934 | Python | PyPy3 (2.4.0) | py | Runtime Error | 273 | 64632 | 2530 | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
import bisect
from collections import deque
from fractions import gcd
from functools import lru_cache
#############
# Constants #
#############
MOD = 10**9+7
INF = float('inf')
#############
# Func... |
s898319464 | p03699 | u593567568 | 1589298313 | Python | Python (3.4.3) | py | Runtime Error | 278 | 3064 | 305 | N = int(input())
P = [int(input()) for _ in range(N)]
POINT = [False] * (10 ** 4 + 101)
POINT[0] = True
LP = len(POINT)
for p in P:
for i in range(10**4+1,-1,-1):
POINT[i+p] = POINT[i] | POINT[i+p]
ans = 0
for i in range(LP):
if POINT[i] and i % 10 != 0:
ans = max(i,ans)
print(ans)
|
s937982899 | p03699 | u593567568 | 1589297861 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3064 | 280 | N = int(input())
P = [int(input()) for _ in range(N)]
POINT = [False] * (10 ** 4 + 10)
POINT[0] = True
LP = len(POINT)
for p in POINT:
for i in range(LP):
POINT[i+p] = POINT[i] | POINT[i+p]
ans = 0
for i in range(LP):
if POINT[i]:
ans = max(i,ans)
print(ans) |
s629561739 | p03699 | u077898957 | 1588874146 | Python | Python (3.4.3) | py | Runtime Error | 151 | 12420 | 230 | import numpy as np
n=int(input())
S=np.array(sorted([int(input()) for i in range(n)]))
for i in range(n-1):
S=np.append(S,S[i+1:]+S[:n-i-1])
ans=0
for i in range(len(S)):
if S[i]%10!=0:
ans=max(ans,S[i])
print(ans) |
s932444541 | p03699 | u755180064 | 1588710613 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 470 | def main():
n = int(input())
test = [int(input()) for i in range(n)]
score = sum(test)
test.sort()
if len(list(filter(lambda x:x % 10 == 0, test))) == n:
print(0)
exit()
ind = 0
while score % 10 == 0 or score > 10:
tmp = []
for i in range(len(test)):
... |
s557488164 | p03699 | u755180064 | 1588710384 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3188 | 451 | def main():
n = int(input())
test = [int(input()) for i in range(n)]
score = sum(test)
test.sort()
if len(list(filter(lambda x:x % 10 == 0, test))) == n:
print(0)
exit()
tmp = []
ind = 0
while score % 10 == 0:
for i in range(len(test)):
tmp.append(scor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.