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
s447610340
p03502
u118211443
1550112547
Python
Python (3.4.3)
py
Runtime Error
17
2940
67
N=(input()) print("Yes"if int(N)%(int(N[0])+int(N[1]))==0 else"No")
s705311659
p03502
u174394352
1549498995
Python
PyPy3 (2.4.0)
py
Runtime Error
183
38768
97
Ns=input() N=int(N) fX=0 for s in Ns: fX+=int(s) if N%fX==0: print('Yes') else: print('No')
s587005883
p03502
u740284863
1549328520
Python
Python (3.4.3)
py
Runtime Error
18
3060
131
N = int(input()) S = str(N) f = 0 for i in range(len(N)): f += int(S[i]) if N % f == 0: print("Yes") else: print("No")
s270995317
p03502
u635339675
1548826412
Python
Python (3.4.3)
py
Runtime Error
18
2940
154
a=[int(i) for i in input()] for i in range(len(a)-1): b=str(a[i])+str(a[i+1]) int(b) c=int(sum(a)) b=int(b) if b%c==0: print("Yes") else: print('No')
s518456488
p03502
u785989355
1547410712
Python
Python (3.4.3)
py
Runtime Error
18
2940
95
N=input() s=0 for i in N: s+=int(i) if N%s==0: print("Yes") else: print("No")
s157733378
p03502
u371467115
1546651091
Python
Python (3.4.3)
py
Runtime Error
19
3064
80
n=int(input()) s=eval("+".join(n)) if n%s==0: print("Yes") else: print("No")
s317396829
p03502
u213854484
1545368914
Python
Python (3.4.3)
py
Runtime Error
18
2940
117
x = input() def f(x): return sum(map(int, list(str(x)))) if x % f(x) == 0: print("Yes") else: print("No")
s175550943
p03502
u948986080
1545233181
Python
PyPy3 (2.4.0)
py
Runtime Error
187
38256
133
n=input() m=n s=0 while True: q,mod=divmod(m,10) s+=mod m=q if q<=0: break if n%s==0: print("Yes") else: print("No")
s733738875
p03502
u948986080
1545233075
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38640
133
n=input() m=n s=0 while true: q,mod=divmod(m,10) s+=mod m=q if q<=0: break if n%s==0: print("Yes") else: print("No")
s055179903
p03502
u928784113
1545116931
Python
Python (3.4.3)
py
Runtime Error
18
2940
160
# -*- coding: utf-8 -*- N = str(input()) a=[] for i in range(N): S = int(N[i]) a.append(S) T = sum(a) if int(N) % T == 0: print("Yes") else: print("No")
s245010218
p03502
u928784113
1545116891
Python
Python (3.4.3)
py
Runtime Error
17
3060
160
# -*- coding: utf-8 -*- N = str(input()) a=[] for i in range(N): S = int(N[i]) a.append(S) T = sum(S) if int(N) % T == 0: print("Yes") else: print("No")
s616764725
p03502
u432805419
1541975576
Python
Python (3.4.3)
py
Runtime Error
17
2940
99
a = int(input()) b = list(map(int,list(a))) if a % sum(b) == 0: print("Yes") else: print("No")
s447925632
p03502
u432805419
1541975533
Python
Python (3.4.3)
py
Runtime Error
17
2940
99
a = int(input()) b = list(map(int,list(a))) if a / sum(b) == 0: print("Yes") else: print("No")
s957463520
p03502
u136869985
1540037544
Python
Python (3.4.3)
py
Runtime Error
17
2940
104
X = input() fx = 0 for x in X: fx += int(x) if X % fx == 0: print("Yes") else: print("No")
s440585874
p03502
u320325426
1538778969
Python
Python (3.4.3)
py
Runtime Error
17
2940
110
n = input() nl = [int(i) for i in n] nl_s = 0 for i in nl: nl_s += i print("Yes" if n % nl_s == 0 else "No")
s636965233
p03502
u589087860
1538358178
Python
Python (3.4.3)
py
Runtime Error
17
2940
155
n = int(input()) ntmp = n sum = 0 while ntmp >= 10: sum += ntmp % 10 ntmp = ntmp // 10 if n % sum == 0: print("Yes") else: print("No")
s840654250
p03502
u589087860
1538358056
Python
Python (3.4.3)
py
Runtime Error
17
2940
161
n = int(input()) ntmp = n sum = 0 while ntmp >= 10: sum += ntmp % 10 ntmp = (int)(ntmp / 10) if n % sum == 0: print("Yes") else: print("No")
s746542411
p03502
u853900545
1537893400
Python
Python (3.4.3)
py
Runtime Error
17
2940
89
n = input() t = sum(map(int,n)) if (t // n) == 0: print('Yes') else: print('No')
s089236061
p03502
u052347048
1534420800
Python
Python (3.4.3)
py
Runtime Error
17
2940
72
a= input() print("Yes" if int(a) % (int(a[0])+int(a[1])) == 0 else "No")
s458777449
p03502
u599547273
1534420748
Python
Python (3.4.3)
py
Runtime Error
17
2940
61
n=int(input());print("No"if n%sum(map(int,str(s))) else"Yes")
s595981083
p03502
u333139319
1530721432
Python
Python (3.4.3)
py
Runtime Error
18
2940
162
""" https://abc080.contest.atcoder.jp/tasks/abc080_b """ n=input() a=0 for i in range(len(n)): a=a+int(n[i]) if n%a==0: print("Yes") else: print("No")
s831451402
p03502
u506302470
1530234874
Python
Python (3.4.3)
py
Runtime Error
17
2940
104
N=input() A=int(input()) B=0 for i in N: B+=int(i) if A%B==0: print("Yes") else: print("No")
s765752574
p03502
u136395536
1527250846
Python
Python (3.4.3)
py
Runtime Error
17
3060
223
Nchar = input() length = len(Nchar) N = int(Nchar) tmp = N fx = 0 for i in range(length): kazu = int(tmp*(0.1**(length-i))) fx = fx + kazu tmp = tmp - kazu if(N%fx == 0): print("Yes") else: print("No")
s709170811
p03502
u040380068
1525892318
Python
Python (2.7.6)
py
Runtime Error
11
2568
152
def harshad(x): sum = 0 for i in range(0, len(x)): sum = sum + x[i] if int(x)%sum == 0: return 'Yes' else: return 'No' print harshad(raw_input())
s948199639
p03502
u061545295
1524986548
Python
Python (3.4.3)
py
Runtime Error
17
2940
104
N = input() num = [int(i) for i in N] f = sum(num) if N%f == 0: print("Yes") else: print('No')
s301159219
p03502
u058240079
1520950710
Python
Python (3.4.3)
py
Runtime Error
17
3064
92
n = raw_input() if int(n) % sum(map(int, list(n))) == 0: print('YES') else: print('NO')
s987125818
p03502
u019584841
1519845903
Python
Python (3.4.3)
py
Runtime Error
17
2940
93
s=input() n=[int(c) for c in s] if int(s)%sum(n)==0: print('Yes') else: print('No')
s009416449
p03502
u319612498
1519448648
Python
Python (3.4.3)
py
Runtime Error
17
2940
79
xs=input() xi=int(xs) xs=list(xs) fx=sum(xs) print("Yes" if xi%fx==0 else "No")
s919822446
p03502
u140251125
1516221679
Python
Python (3.4.3)
py
Runtime Error
17
2940
124
import math N = int(input()) l = [int(x) for x in list(str(N))] if X%sum(l) == 0: print('Yes') else: print('No')
s824956682
p03502
u846150137
1514586127
Python
Python (3.4.3)
py
Runtime Error
17
2940
104
a=input() x=int(a) y=0 for i in len(a): y+=int(a[i]) if x % y==0: print('Yes') else: print('No')
s669214866
p03502
u846150137
1514586078
Python
Python (3.4.3)
py
Runtime Error
17
2940
101
a=input() x=int(a) y=0 for i in len(n): y+=int(i) if x % y==0: print('Yes') else: print('No')
s649483886
p03502
u854627522
1514074897
Python
Python (3.4.3)
py
Runtime Error
17
2940
244
import sys def sumDigits(x): s = 0 while x > 0: s += x % 10 x = x // 10 return s n, a, b = map(int, sys.stdin.readline().split()) s = 0 for i in range(1, n+1): if a <= sumDigits(i) <= b: s += i print(s)
s016765908
p03502
u814166125
1513903681
Python
Python (3.4.3)
py
Runtime Error
18
3060
192
# -*- coding: utf-8 -*- N, A, B = list(map(int,input().split())) ret = 0 for n in range(1,N+1): s = sum(list(map(int,list(str(n))))) if s>=A and s<=B: ret += n print(ret)
s602130344
p03502
u129354464
1512712535
Python
Python (3.4.3)
py
Runtime Error
2104
2940
125
X = int(input()) a = X b = 0 while (a>10): b += (a % 10) + (X / 10) if X % b == 0: print("Yes") else: print("No")
s575899162
p03502
u818655004
1512629305
Python
Python (3.4.3)
py
Runtime Error
19
3188
154
x = input() keta = len(str(x)) f = [] for i in range(keta): f.append(int(str(x)[i])) f = sum(f) if x%f == 0: print('Yes') else: print('No')
s065897537
p03502
u370331385
1512427486
Python
Python (3.4.3)
py
Runtime Error
17
3064
162
N=input a=list(N) b=len(a) sum=0 for i in range(b): a[i]=int(a[i]) sum += a[i] print(a[i]) N=int(N) if(N%sum==0): print("Yes") else: print("No")
s176091174
p03502
u370331385
1512427253
Python
Python (3.4.3)
py
Runtime Error
18
3060
147
N=input() a=list(N) b=len(a) sum=0 for i in range(b): a[i]=int(a[i]) sum += a[i] print(a[i]) if(N%sum==0): print("Yes") else: print("No")
s171614276
p03502
u158225062
1512365977
Python
Python (3.4.3)
py
Runtime Error
18
3064
160
# coding: utf-8 N = input() N_list = list(N) N_len = len(N_list) for i in range(N_len): A += N_list[i] if N == A : print("Yes") else: print("No")
s159439997
p03502
u209951743
1512356681
Python
Python (3.4.3)
py
Runtime Error
17
2940
163
N = input() S = len(N) for i in range(S-1) : f=0 f = f + int(N[i]) if f==0: print("No") if else int(N)%f==0: print("Yes") else: print("No")
s353515617
p03502
u319612498
1512356438
Python
Python (3.4.3)
py
Runtime Error
17
2940
171
N=input() def digitsum(N) : s = str(N) array = list(map(int, list(s))) T = sum(array) return T U = digitsum(N) if N % U ==0 : print("Yes") else: print("No")
s690046634
p03502
u209951743
1512356349
Python
Python (3.4.3)
py
Runtime Error
17
2940
132
N = input() S = len(N) for i in range[S] : f=0 f = f + int(N[i]) if int(N)%f==0: print("Yes") else: print("No")
s778650015
p03502
u209951743
1512356152
Python
Python (3.4.3)
py
Runtime Error
18
2940
132
N = input() S = len(N) for i in range[S] : f=0 f = f + int(N[i]) if int(N)%f==0: print("Yes") else: print("No")
s573872997
p03502
u781152930
1512355473
Python
Python (3.4.3)
py
Runtime Error
17
2940
208
# -*- coding: utf-8 -*- N = int, input() num = str(N[1]) char_list = list(num) sum = 0 for i in range(len(char_list)): sum += int(char_list[i]) if N[1] % sum == 0: print("Yes") else: print("No")
s233205330
p03502
u781152930
1512355443
Python
Python (3.4.3)
py
Runtime Error
17
3060
217
# -*- coding: utf-8 -*- N = int, input() print(N) num = str(N[1]) char_list = list(num) sum = 0 for i in range(len(char_list)): sum += int(char_list[i]) if N[1] % sum == 0: print("Yes") else: print("No")
s378141988
p03502
u618512227
1512355391
Python
Python (3.4.3)
py
Runtime Error
17
2940
108
n = int(input()) l = list(n) f = 0 for i in l: f += int(i) if n%f == 0: print('Yes') else: print('No')
s177947908
p03502
u141844407
1512354302
Python
Python (3.4.3)
py
Runtime Error
17
2940
110
x = input() digits = [int(a) for a in x] fx = sum(digits) if x % fx == 0: print("Yes") else: print("No")
s303632668
p03502
u141844407
1512354260
Python
Python (3.4.3)
py
Runtime Error
17
2940
97
x = input() digits = [int(a) for a in x] fx = sum(digits) print("Yes" if x % fx == 0 else "No")
s388963621
p03502
u274907892
1512353601
Python
Python (3.4.3)
py
Runtime Error
17
2940
87
N = str(input()) A = 0 for i in N: A += int(i) return "Yes" if N%A == 0 else "No"
s655386761
p03502
u214380782
1512353439
Python
Python (3.4.3)
py
Runtime Error
17
3064
109
n = input() fx = 0 for i in range(len(n)): fx += n[i] if int(n)%fx == 0: print('Yes') else: print('No')
s693019610
p03502
u676264453
1512353393
Python
Python (3.4.3)
py
Runtime Error
18
2940
113
N = str(input()) ans = 0 for i in N: ans += int(i) if (N % ans == 0): print('Yes') else: print('No')
s643943026
p03502
u552668967
1512353218
Python
Python (2.7.6)
py
Runtime Error
10
2568
131
from sys import stdin ans = 'No' n = int(stdin.readline()) m = n s = 0 while m: s += m%10 m/=10 if n%m==0: ans = 'Yes' print ans
s642885463
p03502
u761320129
1512353007
Python
Python (3.4.3)
py
Runtime Error
17
2940
108
N = int(input()) a = 0 n = N while n >= 10: a += n%10 n //= 10 print('Yes' if N % a == 0 else 'No')
s802256796
p03502
u825528847
1512352978
Python
Python (3.4.3)
py
Runtime Error
17
2940
76
N = input() x = sum(int(i) for i in N) print("Yes" if N % x == 0 else "No")
s461532404
p03503
u620846115
1600920112
Python
Python (3.8.2)
py
Runtime Error
27
9140
368
N = int(input()) F = [list(map(int,input().split())) for i in range(N)] P = [list(map(int,input().split())) for i in range(N)] ans = -10**9 for i in range(2**10-1): Bit = [1]**10 for j in range(10): if (i>>j)&1: Bit[j]=0 count = 0 for k in range(N): op = sum(b&f for b,f in zip(Bit,F[k])) cou...
s279483286
p03503
u620846115
1600920021
Python
Python (3.8.2)
py
Runtime Error
25
9200
366
N = int(input()) F = [list(map(int,input().split())) for i in range(N)] P = [list(map(int,input().split())) for i in range(N)] ans = -10**9 for i in range(2**10-1): Bit = [0]**10 for j in range(10): if (i>>j)&1: Bit[j]=1 count = 0 for k in range(N): op = sum(b&f for b,f in zip(Bit,F[k])) coun...
s074233207
p03503
u636683284
1598540206
Python
PyPy3 (7.3.0)
py
Runtime Error
92
74988
415
n = int(input()) l = [list(map(int,input().split())) for _ in range(n)] p = [list(map(int,input().split())) for _ in range(n)] maxi = -10**10 for i in range(1,2 ** 10): num = [0]*10 for j in range(10): if ((i >> j) & 1): for k in range(n): num[k] += l[k][j] benefit = 0 ...
s917305909
p03503
u955248595
1597254012
Python
Python (3.8.2)
py
Runtime Error
24
9160
511
N = int(input()) F = [[] for TF in range(0,N)] for TF in range(0,N): F[TF] = [int(T) for T in input().split()] P = [[] for TP in range(0,N)] for TP in range(0,N): P[TP] = [int(T) for T in input().split()] MAXB = -10**9 for TB in range(1,2**10): BaseConv,BaseSInd = ForBaseConvert(TB,10,2) Benefit = ...
s246711039
p03503
u986254798
1595549004
Python
Python (3.8.2)
py
Runtime Error
36
9208
462
n = int(input()) F = [] P = [] for i in range(n): F.append(list(map(int, input().split()))) for i in range(n): P.append(list(map(int, input().split()))) ans = -10**9 for i in range(1, 1 << (10)): C = [0]*11 for j in range(10): if i & 2**j: for k in range(n): if F[k][...
s187102661
p03503
u747703115
1595379306
Python
Python (3.8.2)
py
Runtime Error
30
9112
421
import sys n = int(input()) F = [list(map(int, sys.stdin.readline().split())) for _ in range(n)] P = [list(map(int, sys.stdin.readline().split())) for _ in range(n)] ans = 0 for i in range(1,pow(2,10)): b = bin(i)[2:].zfill(10) t = 0 for j in range(n): c = 0 for k in range(10): i...
s055991018
p03503
u496821919
1594752424
Python
Python (3.8.2)
py
Runtime Error
40
9172
456
n = int(input()) data1 = [list(map(int,input().split())) for _ in range(n)] data2 = [list(map(int,input().split())) for _ in range(n)] ans = [] trans = -1 for i in range(2**10): S = [0]*10 l = 0 for j in range(10): for k in range(n): S[k] += data1[k][j]*((i>>j)&1) for j in range(n): ...
s123766396
p03503
u812576525
1593129718
Python
Python (3.8.2)
py
Runtime Error
20
9024
407
n = int(input()) f = [list(map(int, input().split())) for i in range(n)] p = [list(map(int, input().split())) for j in range(n)] ans = -9999999999 for i in range(1, 1024): bf = 0 for j in range(n): cnt = 0 for k in range(10): if (i >> k) & 1 == 1 and f[j][k] == 1: ...
s617078087
p03503
u819135704
1592623440
Python
Python (3.8.2)
py
Runtime Error
124
9984
1208
N = int(input()) F = [[int(i) for i in input().split()] for j in range(N)] P = [[int(i) for i in input().split()] for j in range(N)] ci = 0 c = [] P_max = -1000000000 for i in range(2): for j in range(2): for k in range(2): for l in range(2): for m in range(2): ...
s873836558
p03503
u711539583
1592061277
Python
Python (3.4.3)
py
Runtime Error
626
3948
462
import sys input = sys.stdin.readline n = int(input()) f = [] for i in range(n): f.append(list(map(int, input().split()))) p = [] for i in range(n): p.append(list(map(int, input().split()))) cand = [] for i in range(1, 2 ** 20): for j in range(20): cnt = [0] * n if i & (1 << j): for k in range(n): ...
s810952270
p03503
u631558039
1591680432
Python
PyPy3 (2.4.0)
py
Runtime Error
180
38512
477
import math n=int(input()) f=list() p=list() ans=-10**10 for i in range(n): f.append(list(map(int,input().split()))) for i in range(n): p.append(list(map(int,input().split()))) for i in range(1,1<<10): shop=list() cnt=[0]*n tmp=0 for j in range(10): if i&(1<<j): shop.append(...
s634166441
p03503
u591808161
1591498921
Python
PyPy3 (2.4.0)
py
Runtime Error
181
38384
554
import itertools import numpy as np mylist = [0, 1] n = int(input().rstrip()) mise = [list(map(int, input().rstrip().split())) for i in range(n)] mine = [list(map(int, input().rstrip().split())) for i in range(n)] maxnum = - float('inf') for i in itertools.product(mylist, repeat = 10): if sum(i) == 0: con...
s209514431
p03503
u029000441
1590240700
Python
Python (3.4.3)
py
Runtime Error
17
3064
316
n=I() op=[LI() for i in range(n)] pro=[LI() for i in range(n)] vals=[] for j in range(1,2**10): ans=0 common=[0 for i in range(n)] for k in range(n): for i in range(10): x=(j>>i) %2 common[k]+=x*op[k][i] ans+=pro[k][common[k]] vals.append(ans) print(max(vals))
s875214439
p03503
u089142196
1589603570
Python
Python (3.4.3)
py
Runtime Error
18
3192
446
N=int(input()) F=[ [[0 for _ in range(2)] for _ in range(5)] for _ in range(N)] P= [[0 for _ in range(10)] for _ in range(N)] total= [[0 for _ in range(5)] for _ in range(2)] for i in range(N): tmp=list( map(int,input().split()) ) for j in range(5): for k in range(2): F[i][j][k]=tmp[j+k] for i in range(N...
s552854636
p03503
u414458988
1588730665
Python
PyPy3 (2.4.0)
py
Runtime Error
226
41328
611
def main(): n = int(input()) f = [list(map(int,input().split())) for i in range(n)] p = [list(map(int,input().split())) for i in range(n)] bit = 1<<10 #全探索2**10 res = -10**10 for i in range(1,bit): chk = [0]*n cnt = 0 for j in range(10): # 10回分有無判定 if (i>>j)&1...
s928194654
p03503
u151785909
1588269818
Python
Python (3.4.3)
py
Runtime Error
376
3316
436
n = int(input()) f = [list(map(int,input().split())) for i in range(n)] p = [list(map(int,input().split())) for i in range(n)] s = [list(map(int,bin(x)[2:].zfill(10))) for x in range(2**10)] s.pop(0) c = 0 ans = 0 max = -10000000 for k in range(2**10-1): for i in range(n): for j in range(10): c...
s198077983
p03503
u103902792
1585704763
Python
PyPy3 (2.4.0)
py
Runtime Error
184
38640
608
n = int(input()) F = [] for i in range(n): f = list(map(int,input().split())) shop = [] for j in range(5): shop.append([f[2*j],f[2*j+1]]) F.append(shop) P = [list(map(int,input().split())) for _ in range(n)] import numpy as np ans = -float('inf') for i in range(1,2**10): index =format(i,'b').zfill(10) ...
s336386988
p03503
u788068140
1585537498
Python
Python (3.4.3)
py
Runtime Error
152
12508
635
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] for i in range(1,2 ** 10): mask = np.z...
s846962095
p03503
u788068140
1585537476
Python
Python (3.4.3)
py
Runtime Error
165
12996
650
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] for i in range(1,2 ** 10): mask = np.z...
s706564002
p03503
u788068140
1585537040
Python
Python (3.4.3)
py
Runtime Error
151
12496
657
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] for i in range(1,2 ** 10): mask = np.z...
s263662577
p03503
u788068140
1585537010
Python
Python (3.4.3)
py
Runtime Error
261
18380
657
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] for i in range(1,2 ** 10): mask = np.z...
s347726662
p03503
u788068140
1585536673
Python
Python (3.4.3)
py
Runtime Error
150
12424
298
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): return [] result = calculate(N, ARR, PRR) print(max(result))
s888419789
p03503
u788068140
1585536549
Python
Python (3.4.3)
py
Runtime Error
149
12424
304
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): return [] result = calculate(N, ARR, PRR) print(max(result))
s753174467
p03503
u788068140
1585536478
Python
Python (3.4.3)
py
Runtime Error
150
12424
324
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) return [] result = calculate(N, ARR, PRR) print(max(result...
s240076481
p03503
u788068140
1585536435
Python
Python (3.4.3)
py
Runtime Error
150
12444
339
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] return brr result = calculate(N, ARR, PRR) p...
s539195781
p03503
u788068140
1585536402
Python
Python (3.4.3)
py
Runtime Error
153
12496
384
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] for i in range(1,2 ** 10): a = 1 ...
s878410386
p03503
u788068140
1585536374
Python
Python (3.4.3)
py
Runtime Error
298
15932
398
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] for i in range(1,2 ** 10): mask = np.z...
s764293138
p03503
u788068140
1585536336
Python
Python (3.4.3)
py
Runtime Error
157
12472
483
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] for i in range(1,2 ** 10): mask = np.z...
s794594889
p03503
u788068140
1585536291
Python
Python (3.4.3)
py
Runtime Error
173
12516
547
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] for i in range(1,2 ** 10): mask = np.z...
s413035519
p03503
u788068140
1585536120
Python
Python (3.4.3)
py
Runtime Error
275
18636
656
import numpy as np N = int(input()) ARR = [] for i in range(N): ARR.append([int(s) for s in input().split(" ")]) PRR = [] for i in range(N): PRR.append([int(s) for s in input().split(" ")]) def calculate(n, arr, prr): arr = np.array(arr) brr = [] for i in range(1,2 ** 10): mask = np.z...
s078264596
p03503
u576432509
1585026374
Python
Python (3.4.3)
py
Runtime Error
19
3192
1173
icase=0 if icase==0: n=int(input()) f=[] for i in range(n): fi=map(int,input().split()) f.append(fi) p=[] for i in range(n): pi=map(int,input().split()) p.append(pi) elif icase==1: n=1 f=[[1, 1, 0, 1, 0, 0, 0, 1, 0, 1]] p=[[3, 4, 5, 6, 7, 8, 9, -2, -3, ...
s810643161
p03503
u686036872
1583648925
Python
PyPy3 (2.4.0)
py
Runtime Error
179
39152
399
N = int(input()) F = [list(map(int, input().split())) for i in range(N)] P = [list(map(int, input().split())) for j in range(N)] max = -9999999999 for i in range(1, 2**10): sum = 0 for j in range(N): count = 0 for k in range(10): if ((i >> k)&1) == 1 and F[j][k] == 1: ...
s722443318
p03503
u686036872
1583648877
Python
PyPy3 (2.4.0)
py
Runtime Error
177
39024
387
N = int(input()) F = [list(map(int, input().split())) for i in range(N)] P = [list(map(int, input().split())) for j in range(N)] max = -9999999999 for i in range(1, 2**10): for j in range(N): count = 0 for k in range(10): if ((i >> k)&1) == 1 and F[j][k] == 1: count +...
s423877161
p03503
u995062424
1583367362
Python
Python (3.4.3)
py
Runtime Error
293
3064
387
N = int(input()) F= [list(map(int, input().split())) for _ in range(N)] P= [list(map(int, input().split())) for _ in range(N)] tmp = 0 ans = 0 for i in range(1, 2**10+1): tmp = 0 for j in range(N): cnt = 0 for k in range(10): if((i>> k)%2 == 1 and F[j][k] == 1): cnt ...
s296742133
p03503
u995062424
1583291090
Python
Python (3.4.3)
py
Runtime Error
18
3064
752
N = int(input()) F= [list(map(int, input().split())) for _ in range(N)] P= [list(map(int, input().split())) for _ in range(N)] num = 0 store = [] second = [] pos = [] ans = 0 min_z = 10**7+1 n = 0 for i in range(N): num = F[i].count(1) if(max(P[i][:(num+1)]) != P[i][0]): ans += max(P[i][:(num+1)]) ...
s701437764
p03503
u358254559
1582503677
Python
PyPy3 (2.4.0)
py
Runtime Error
188
38640
543
n = int(input()) f=[] for i in range(n): tmp = list(map(int,input().split())) f.append(tmp) p=[] for i in range(n): tmp = list(map(int,input().split())) p.append(tmp) from itertools import * first=True ans=-10**12 for tmp in list(product([0,1], repeat=10)): if first: first=False con...
s136559365
p03503
u372144784
1580533003
Python
PyPy3 (2.4.0)
py
Runtime Error
187
40688
941
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines n = int(readline()) lst1 = [list(map(int,readline().split())) for i in range(n)] lst2 = [list(map(int,readline().split())) for i in range(n)] #曜日、時刻にどの店が営業しているかを埋め込む lst3 = [[] for _ in range(10)] for i...
s471545888
p03503
u993435350
1577483013
Python
Python (3.4.3)
py
Runtime Error
17
3064
1084
N = int(input()) F = [] P = [] for i in range(N): f = list(map(int,input().split())) F.append(f) for i in range(N): p = list(map(int,input().split())) P.append(p) value = 0 ans = - (10 ** 9) def recur(list): con = len(list) #list = [0,0, ... ~ 0] ~ [1,1, ... ~ 1] if con == 10: #1がない = 出店していない...
s790592609
p03503
u989345508
1576615693
Python
Python (3.4.3)
py
Runtime Error
17
2940
720
#include<iostream> #include<vector> #include<bitset> #include<algorithm> #include<cmath> using namespace std; typedef vector< vector<int> > vv; int main(){ int n;cin >> n; vv f(n,vector<int>(10,0)); for(int i=0;i<n;i++)for(int j=0;j<10;j++)cin >> f[i][j]; vv p(n,vector<int>(11,0)); for(int i=0;i<n;i++)for(i...
s825330068
p03503
u994521204
1576540194
Python
Python (3.4.3)
py
Runtime Error
18
3064
487
n=int(input()) F= [list(map(int,input().split())) for i in range(N)] #F[i][j]はi行目、すなわち店i+1の時間帯jに対してやっているかどうか P= [list(map(int,input().split())) for i in range(N)] #P[i][j]は店i+1が時間jに1で自分も1の時に得られる効果 ans=[] for k in range(n): for i in range(2**10): c=0 for j in range(10): if ((i>>j)&1) and ...
s985235230
p03503
u994521204
1576539085
Python
Python (3.4.3)
py
Runtime Error
17
3064
482
n=int(input()) F= [list(map(int,input().split())) for i in range(N)] #F[i][j]はi行目、すなわち店i+1の時間帯jに対してやっているかどうか P= [list(map(int,input().split())) for i in range(N)] #P[i][j]は店i+1が時間jに1で自分も1の時に得られる効果 ans=[] for k in range(n): for i in range(2**10): c=0 for j in range(10): if (i>>j)&1 and F[...
s357059906
p03503
u981931040
1575696425
Python
Python (3.4.3)
py
Runtime Error
18
3064
584
N = int(input()) open = [] for _ in range(N): open.append(list(map(int,input().split()))) open = np.array(open) sales = [] for _ in range(N): sales.append(list(map(int,input().split()))) sales = np.array(sales) ans = -float("inf") for i in range(1 , 1024): sum_val = 0 mapping = [] for k in range(N)...
s235476998
p03503
u970197315
1575522058
Python
Python (3.4.3)
py
Runtime Error
25
3188
639
# ABC080 C - Shopping Street si = lambda: input() ni = lambda: int(input()) nm = lambda: map(int, input().split()) nl = lambda: list(map(int, input().split())) n=ni() f=[nl() for _ in range(n)] p=[nl() for _ in range(n)] o = [] ans = -10**8 for i in range(2**10): op = [0]*10 for j in range(10): if ((i>>...
s848860529
p03503
u970197315
1575521818
Python
PyPy3 (2.4.0)
py
Runtime Error
205
42352
661
# ABC080 C - Shopping Street si = lambda: input() ni = lambda: int(input()) nm = lambda: map(int, input().split()) nl = lambda: list(map(int, input().split())) n=ni() f=[nl() for _ in range(n)] p=[nl() for _ in range(n)] o = [] ans = -10**8 for i in range(2**10): op = [0]*10 for j in range(10): if ((i>>...
s760191469
p03503
u937642029
1574699461
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38384
2708
from collections import Counter,defaultdict,deque import sys import bisect import math import itertools import string import queue import copy import numpy as np # import scipy from itertools import permutations, combinations from heapq import heappop, heappush input = sys.stdin.readline sys.setrecursionlimit(10**8) mo...
s972169335
p03503
u803617136
1574659556
Python
Python (3.4.3)
py
Runtime Error
17
3064
409
A, B, X = map(int, input().split()) ans = 0 if (X - B * 10) // A > pow(10, 9): ans = pow(10, 9) else: for i in range(1, 10): num = (X - i * B) // A if i == 10 and num > pow(10, 9): ans = pow(10, 9) if pow(10, i) > num >= pow(10, i - 1): ans = max(ans, num...
s319451186
p03503
u153902122
1574353760
Python
Python (3.4.3)
py
Runtime Error
17
3064
333
N = int(input()) F = [int("".join(input().split()), 1) for i in range(N)] P = [list(map(int, (input().split()))) for i in range(N)] ans = float('-inf') for bit in range(1,1024): sum_p = 0 for shop in range(N): time = bin(F[shop] & bit).count('1') sum_p += P[shop][time] ans = max(sum_p, ans...