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
s239131202
p03598
u724742135
1557892309
Python
Python (3.4.3)
py
Runtime Error
17
3060
254
from sys import stdin N = int(stdin.readline().rstrip()) K = int(stdin.readline().rstrip()) X = [int(_) for _ in stdin.readline().rstrip().split()] ans = 0 for i in x: if i < K - i: ans += 2 * i else: ans += 2 * (K - i) print(ans)
s220883755
p03598
u724742135
1557892256
Python
Python (3.4.3)
py
Runtime Error
17
3060
256
from sys import stdin N = int(stdin.readline().rstrip()) K = int(stdin.readline().rstrip()) X = [int(_) for _ in stdin.readline().rstrip().split()] ans = 0 for i in x: if i < K - i: ans += 2 * i else: ans += 2 * (K - i) print(route)
s864135816
p03598
u548545174
1555612240
Python
Python (3.4.3)
py
Runtime Error
18
3060
205
N = int(input()) K = int(input()) x = list(map(int, input().split())) ans = 0 for i in range(N): if abs(K - x[i]) > abs(x[i]): ans += 2 * x[i] else: ans += 2 * (k - x[i]) print(ans)
s114214625
p03598
u548545174
1555611806
Python
Python (3.4.3)
py
Runtime Error
17
3060
157
N = int(input()) K = int(input()) x = list(map(int, input().split())) ans = 0 for i in range(N): ans.append(min(abs(0 - x[i]), abs(K - x[i]))) print(ans)
s935007997
p03598
u163320134
1555358121
Python
Python (3.4.3)
py
Runtime Error
18
3060
162
n=int(input()) k=int(input()) arr=list(map(int,input())) ans=0 for i in range(n): if int(k/2)<arr[i]: ans+=arr[i]*2 else: ans+=(k-arr[i])*2 print(ans)
s990844521
p03598
u172493590
1554872749
Python
Python (3.4.3)
py
Runtime Error
17
2940
186
n = int(input()) k = int(input()) x = input() sum = 0 for item in x: if 0.5 * k <= int(item): sum += 2(k - int(item)) else: sum += 2 * int(item) print(sum)
s272554376
p03598
u732870425
1554735485
Python
Python (3.4.3)
py
Runtime Error
17
3060
204
N = int(input()) K = int(input()) X = list(map(int, input().split())) sum_len = 0 for i in X: if X < abs(K-X[i]): sum_len += X * 2 else: sum_len += abs(K-X[i]) * 2 print(sum_len)
s741922737
p03598
u859897687
1554377898
Python
Python (3.4.3)
py
Runtime Error
18
2940
120
n=int(input()) k=int(input()) ans=0 for _ in map(int,input().split()): a=int(input()) ans+=min(a,k-a) print(ans+ans)
s731311342
p03598
u859897687
1554377863
Python
Python (3.4.3)
py
Runtime Error
17
2940
112
n=int(input()) k=int(input()) ans=0 for _ in map(int,input()): a=int(input()) ans+=min(a,k-a) print(ans+ans)
s698495741
p03598
u859897687
1554377810
Python
Python (3.4.3)
py
Runtime Error
17
2940
100
n=int(input()) k=int(input()) ans=0 for _ in range(n): a=int(input()) ans+=min(a,k-a) print(ans)
s538488522
p03598
u612695892
1554005293
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38384
137
n = int(input()) k = int(input()) arr = list(map(int ,input().split()) sum = 0 for i in arr: sum += 2*min(abs(i), abs(k - i)) print(sum)
s358939754
p03598
u227082700
1553629896
Python
Python (3.4.3)
py
Runtime Error
17
2940
109
n,k,b,ans=int(input()),int(input()),[int(input())for i in range(n)],0 for i in b:ans+=min(i,k-i)*2 print(ans)
s289583727
p03598
u393581926
1553613095
Python
Python (3.4.3)
py
Runtime Error
17
2940
1
l
s413955100
p03598
u393512980
1552662475
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38256
117
n = int(input()) k = int(input()) s = 0 for _ in range(n): x = int(input()) s += min(x * 2, (k - x) * 2) print(s)
s236609015
p03598
u729133443
1551113103
Python
Python (3.4.3)
py
Runtime Error
18
2940
69
_,k,*x=map(open(0).read().split());print(sum(min(t,k-t)*2for t in x))
s036639014
p03598
u726439578
1546819387
Python
Python (3.4.3)
py
Runtime Error
18
2940
123
n=int(input()) k=int(input()) x=list(map(int,input().split())) ans=0 for i in x: ans+=min(abs(x-k),abs(x))*2 print(ans)
s189443044
p03598
u094565093
1536516288
Python
Python (3.4.3)
py
Runtime Error
17
3060
190
N=int(input()) K=int(input()) S=list(map(int, input().split())) total=0 for i in range(A): if abs(S[i]-K)<S[i]: total+=abs(S[i]-K)*2 else: total+=2*S[i] print(total)
s293245080
p03598
u094565093
1536516243
Python
Python (3.4.3)
py
Runtime Error
17
3060
177
N=int(input()) K=int(input()) S=list(map(int, input().split())) total=0 for i in range(A): if abs(S[i]-K)<S[i]: total+=abs(S[i]-K)*2 else: total+=2*S[i]
s608058276
p03598
u277802731
1534548454
Python
Python (3.4.3)
py
Runtime Error
17
2940
142
#74b n = int(input()) k = int(input()) x = list(map(int,input().split())) ans=0 for i in range(n): ans+=min(2*x[i],2*(k-x[i]) print(ans)
s138988214
p03598
u506302470
1529722221
Python
Python (3.4.3)
py
Runtime Error
17
2940
190
#include<bits/stdc++.h> using namespace std; int N,K,a; int main(){ cin>>N>>K; while(N--){ int x; cin>>x; a+=min(K-x,x); } cout<<a*2; return 0; }
s185380402
p03598
u140251125
1529171409
Python
Python (3.4.3)
py
Runtime Error
17
2940
122
# input N_lst = [int(x) for x in list(input())] if N_lst[0] == 9 or N_lst[1] == 9: print('Yes') else: print('No')
s064788805
p03598
u612721349
1520897414
Python
Python (3.4.3)
py
Runtime Error
18
2940
79
p=input;p();k=p();print(sum([2*min(int(i),abs(k-int(i)))for i in p().split()]))
s505081831
p03598
u157085392
1507837619
Python
Python (3.4.3)
py
Runtime Error
18
2940
101
n=int(input()) k=int(input()) a=0 for i in range(n): x=int(input()) a+=min(x,abs(k-x)) print(a*2)
s223816135
p03598
u626881915
1507770820
Python
Python (3.4.3)
py
Runtime Error
19
3060
114
n = int(input()) k = int(input()) x = list(map(int, input())) d = 0 for i in x: d += min(i, k-i) * 2 print(d)
s190130972
p03598
u301823349
1507128730
Python
Python (3.4.3)
py
Runtime Error
17
2940
164
N = int(input()) K = int(input()) ans = 0 for _ in range(N): x = int(input()) if x*2 =< K: asn += x*2 else: ans += (K - x)*2 print(ans)
s716887225
p03598
u540307496
1506889953
Python
Python (3.4.3)
py
Runtime Error
18
3064
241
N = int(input()) K = int(input()) x = [] for i in range(N): x.append([int(i) for i in input().split()]) ans = 0 for i in range(N): if(abs(K-x[i]) >= x[i]): ans += x[i] else: ans += abs(K-x[i]) print(ans)
s276392183
p03598
u782516204
1506737106
Python
Python (3.4.3)
py
Runtime Error
18
3060
181
n = int(input()) k = int(input()) l = [] for i in range(n): l.append(int(input())) ans = 0 for i in l: if( i < abs( i - k ) ): ans += 2*abs(i-k) else: ans += 2*i print(ans)
s189487890
p03598
u795479967
1506692315
Python
Python (2.7.6)
py
Runtime Error
14
2820
275
def calc_dist(N, K, x): dists = [2 * min(K - x_i, x_i) for x_i in x] return sum(dists) if __name__ == "__main__": run_test(calc_dist, test_pair) N = int(raw_input()) K = int(raw_input()) x = map(int, raw_input().split()) print(calc_dist(N, K, x))
s842501475
p03598
u984838588
1506678927
Python
Python (3.4.3)
py
Runtime Error
17
3060
245
Total_dist = 0 #iterate through number of bals for i in range(N): for Rtype in ['A','B']: dist = [] if Rtype == 'A': dist.append(abs(X[i] - 0)) if Rtype == 'B': dist.append(abs(X[i] - K)) Total_dist += min(dist) print(Total_dist)
s077883566
p03598
u984838588
1506678785
Python
Python (3.4.3)
py
Runtime Error
18
3060
321
#get inputs N = int(input()) K = int(input()) X = map(int, input().split()) Total_dist = 0 #iterate through number of bals for i in range(N): for Rtype in ['A','B']: dist = [] if Rtype == 'A': dist.append(abs(X[i] - 0)) if Rtype == 'B': dist.append(abs(X[i] - K)) Total_dist += min(dist) print(Total_dist...
s581293856
p03598
u863076295
1506568863
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
N = int(input()) K = int(input()) x = map(int, input().split()) ans = 0 for i in range(N): ans += 2*min(x, K-x) print(ans)
s211097320
p03598
u863076295
1506568801
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
N = int(input()) K = int(input()) x = map(int, input().split()) ans = 0 for i in range(N); ans += 2*min(x, K-x) print(ans)
s497041707
p03598
u863076295
1506568286
Python
Python (3.4.3)
py
Runtime Error
18
2940
117
N = int(input()) K = int(input()) ans = 0 for i in range(N): x = int(input()) ans += 2*min(x,K-x) print(ans)
s276344177
p03598
u863076295
1506568203
Python
Python (3.4.3)
py
Runtime Error
18
2940
116
N = int(input()) K = int(input()) ans = 0 for i in range(N): x = int(input) ans += 2*min(x,K-x) print(ans)
s894620495
p03598
u863076295
1506568062
Python
Python (3.4.3)
py
Runtime Error
17
2940
116
N = int(input()) K = int(input()) ans = 0 for i in range(N): x = int(input) ans += 2*min(x,K-x) print(ans)
s148760771
p03598
u937164028
1506493008
Python
Python (3.4.3)
py
Runtime Error
17
3060
205
if __name__ == "__main__": N = int(input()) K = int(input()) x = map(int, input().split()) ans = 0 for i in range(N): r = min(x[i],abs(K-x[i])) ans += 2*r print(ans)
s141324328
p03598
u667084803
1505615486
Python
Python (3.4.3)
py
Runtime Error
17
3064
570
A,B,C,D,E,F=map(int,input().split()) best_water=0 best_salt=0 best_rate=0 for i in range(30//A+1):#Aの投入数 for j in range(30//B+1):#Bの投入数 water=(i*A+j*B)*100 if water<=F and water: max_salt=(i*A+j*B)*E for k in range(max_salt//C+1):#Cを何個使うか l=(max_salt-C*k)//D#Dは何個つかえるか salt=k*C+l*D ...
s265414109
p03598
u849401762
1505611159
Python
Python (2.7.6)
py
Runtime Error
10
2568
185
#Collecting.py N,K=input(),input() x = (int(_) for _ in raw_input().split()) for i in range(N): if abs(x[i]) < abs(K-x[i]): sum += abs(x[i]) else: sum += abs(K-x[i]) print(sum)
s642302087
p03599
u521323621
1600909130
Python
Python (3.8.2)
py
Runtime Error
36
9164
715
a,b,c,d,e,f = map(int, input().split()) dp=[-1]*(f + 1) dp[0]=0 for i in range(f+1): if dp[i] == -1: continue for j in [a, b]: water = i + 100*j if water > f: continue dp[water] = 0 salt_max = water * e / 100 dd = int(salt_max - dp[i]) dp_s = [0] * (dd + 1) dp_s[0] = 1 for...
s855988794
p03599
u521323621
1600908743
Python
Python (3.8.2)
py
Runtime Error
44
8976
708
a,b,c,d,e,f = map(int, input().split()) dp=[-1]*(f + 1) dp[0]=0 for i in range(f+1): if dp[i] == -1: continue for j in [a, b]: water = i + 100*j if water > f: continue dp[water] = 0 salt_max = water * e / 100 dd = int(salt_max - dp[i] + 1) dp_s = [0] * dd dp_s[0]=1 for pp ...
s666938290
p03599
u648315264
1600799439
Python
PyPy3 (7.3.0)
py
Runtime Error
96
75036
1195
import math from math import gcd,pi,sqrt INF = float("inf") MOD = 10**9 + 7 import sys sys.setrecursionlimit(10**6) import itertools import bisect from collections import Counter,deque def i_input(): return int(input()) def i_map(): return map(int, input().split()) def i_list(): return list(i_map()) def i_row(N): retu...
s447555260
p03599
u546338822
1600392392
Python
Python (3.8.2)
py
Runtime Error
210
9200
715
def main(): a,b,c,d,e,f = map(int,input().split()) ans = [] for i in range(f//a//100+1): for j in range((f-100*a*i)//b//100+1): if a*i*100+b*j*100 < f: ans.append([i,j]) ans = ans[1:] D = 0 for an in ans: m = a*100*an[0] + b*100*an[1] slv = e*m...
s914596017
p03599
u666550725
1599828324
Python
PyPy3 (7.3.0)
py
Runtime Error
111
74136
680
A, B, C, D, E, F = map(int, input().split())A, B, C, D, E, F = map(int, input().split()) perc = 0.0 ans = [0, 0] op = [0, 0, 0, 0] a = 0 while 100 * a <= F: b = 0 while 100 * (a + b) <= F: c = 0 while 100 * (a + b) + c <= F: if c > (a + b) * E: break d = 0 while 100 * (a + b) + c +...
s314996973
p03599
u761529120
1599574655
Python
PyPy3 (7.3.0)
py
Runtime Error
99
74628
731
def main(): A, B, C, D, E, F = map(int, input().split()) ans = 0 for a in range(F // (A * 100) + 1): for b in range((F - 100 * A * a) // (B * 100) + 1): for c in range((F - 100 * A * a - 100 * B * b) // C + 1): for d in range((F - 100 * A * a - 100 * B * b - C * c) // D +...
s693362018
p03599
u538784937
1599533072
Python
Python (3.8.2)
py
Runtime Error
26
9108
398
A,B,C,D,E,F = map(int,input().split()) dict = {} for a in range(E//100*A): for b in range((E-100*A*a)//100*B): for c in range((E-100*A*a-100*B*b)//C): for d in range((E-100*A*a-100*B*b-C*c)//D): sato = C*c + D*d water = 100*(A*a + B*b) nodo = 100*sato/(sato+water) if nodo <...
s023968196
p03599
u923172145
1599112068
Python
PyPy3 (7.3.0)
py
Runtime Error
88
81848
980
import math A, B, C, D, E, F = map(int,input().split()) w_max = 30 def reduce(x): #約分 #print(x) d = math.gcd(x[0], x[1]) return (x[0] // d, x[1] // d) def is_valid(s, w): #砂糖s、水100w return s <= w * E and s + 100*w <= F ratios = set() Waters = [] for a in range(0, w_max+1, A): for b in range(0, w_max+1, B...
s132350623
p03599
u923172145
1599111915
Python
PyPy3 (7.3.0)
py
Runtime Error
106
82156
972
import math A, B, C, D, E, F = map(int,input().split()) w_max = 30 def reduce(x): #約分 #print(x) d = math.gcd(x[0], x[1]) return (x[0] // d, x[1] // d) def is_valid(s, w): #砂糖s、水100w return s <= w * E and s + 100*w <= F ratios = set() Waters = [] for a in range(0, w_max, A): for b in range(0, w_max, B): ...
s596696897
p03599
u923172145
1599111813
Python
PyPy3 (7.3.0)
py
Runtime Error
132
82540
972
import math A, B, C, D, E, F = map(int,input().split()) w_max = 30 def reduce(x): #約分 #print(x) d = math.gcd(x[0], x[1]) return (x[0] // d, x[1] // d) def is_valid(s, w): #砂糖s、水100w return s <= w * E and s + 100*w <= F ratios = set() Waters = [] for a in range(0, w_max, A): for b in range(0, w_max, B): ...
s610784080
p03599
u819135704
1598554956
Python
Python (3.8.2)
py
Runtime Error
27
9160
729
from math import gcd A, B, C, D, E, F = map(int, input().split()) N = 0 f = F//100; a = f//A; b = f//B cn = D // gcd(C, D) for j in range(b+1): #Bをj杯入れる for i in range(a+1): #Aをi杯入れる if i==0 and j==0: continue elif A*i + B*j > f: continue w = (A*i + B*j) * 100 #水の量...
s960994344
p03599
u302789073
1598539543
Python
Python (3.8.2)
py
Runtime Error
3308
147000
656
a,b,c,d,e,f=map(int, input().split()) amax=f//(a*100) bmax=f//(b*100) c_list=[] sw_list=[] s_list=[] for i in range(amax+1): for j in range(bmax+1): water=100*a*i+100*b*j if water>0: smax=f-water for k in range(smax+1): for l in range(smax+1): su...
s937975438
p03599
u074220993
1598409945
Python
Python (3.8.2)
py
Runtime Error
3308
10156
702
A,B,C,D,E,F = (int(x) for x in input().split()) CCT = {} for a in range(F//(100*A)+1): for b in range(F//(100*B)+1): water = (a*A+b*B)*100 max_suger = water*E//100 for c in range(max_suger//C+1): for d in range(max_suger//D+1): suger = c*C+d*D if ...
s551289615
p03599
u191874006
1597977298
Python
PyPy3 (7.3.0)
py
Runtime Error
94
74452
979
#!/usr/bin/env python3 import sys import math from bisect import bisect_right as br from bisect import bisect_left as bl sys.setrecursionlimit(2147483647) from heapq import heappush, heappop,heappushpop from collections import defaultdict from itertools import accumulate from collections import Counter from collection...
s586794120
p03599
u191874006
1597977017
Python
PyPy3 (7.3.0)
py
Runtime Error
225
68568
917
#!/usr/bin/env python3 import sys import math from bisect import bisect_right as br from bisect import bisect_left as bl sys.setrecursionlimit(2147483647) from heapq import heappush, heappop,heappushpop from collections import defaultdict from itertools import accumulate from collections import Counter from collection...
s797636358
p03599
u955248595
1597786968
Python
Python (3.8.2)
py
Runtime Error
49
9144
743
from math import gcd A,B,C,D,E,F = (int(T) for T in input().split()) SugerMax = 0 for TC in range(0,D//gcd(C,D)): RestC = F-C*TC for TD in range(0,(RestC//D)+1): RestD = RestC-D*TD Suger = C*TC+D*TD if RestD>=0: NeedMin = (100*Suger)/E for TA in range(0,B//gcd(A,B...
s223405090
p03599
u107915058
1597690148
Python
Python (3.8.2)
py
Runtime Error
26
9144
634
dens = 0 ans_water = 0 ans_sugar = 0 for i in range(31): for j in range((F-(100*A*i))//(100*B)+1): for k in range((F-(100*A*i)-(100*B*j))//C+1): for l in range((F-(100*A*i)-(100*B*j)-(100*C*k))//D+1): water = 100*A*i+100*B*j sugar = C*k+D*l if i==j...
s771921024
p03599
u107915058
1597689439
Python
Python (3.8.2)
py
Runtime Error
26
9056
472
dens = 0 ans_water = 0 ans_sugar = 0 for i in range(31): for j in range(31): for k in range(101): water = 100*A*i+100*B*j sugar = C*k+D*(((A*i+B*j)*E-C*k)//D) if water == 0: continue if water+sugar <= F and dens <= sugar/(sugar+water): ...
s061514710
p03599
u107915058
1597680407
Python
Python (3.8.2)
py
Runtime Error
29
9124
552
dens = 0 ans_water = 0 ans_sugar = 0 for i in range(31): for j in range(31): for k in range(101): for l in range(101): water = 100*A*i+100*B*j sugar = C*k+D*l if i==j==0: break if water+sugar <= F and sugar <= E*...
s456687643
p03599
u107915058
1597594535
Python
Python (3.8.2)
py
Runtime Error
27
9064
330
water = 0 sugar = 0 for i in range(F//(100*A)+1): for j in range(F//(100*B)+1): for k in range(F//C+1): for l in range(F//D+1): water = 100*i+100*j sugar = k+l if water+sugar <= F and sugar <= E//100*water: break print(water+sug...
s158039344
p03599
u107639613
1596393412
Python
PyPy3 (7.3.0)
py
Runtime Error
88
74688
865
import sys def input(): return sys.stdin.readline().strip() def main(): A, B, C, D, E, F = map(int, input().split()) weight = 0.1 sugar = 0 for p in range(F // (100 * A) + 1): for q in range((F - 100 * A) // (100 * B) + 1): upper = (A * p + B * q) * E water = (A * p + B...
s851988467
p03599
u876742094
1596231318
Python
PyPy3 (7.3.0)
py
Runtime Error
95
74736
707
A,B,C,D,E,F=map(int,input().split()) water=[] suger=[] for i in range(F//(100*A)+1): for j in range(F//(100*B)+1): if 0<100*(i*A+j*B)<=F: water.append(100*(i*A+j*B)) if 100*(i*A+j*B)>F: break for i in range((F*E/(100+E))//C+1): for j in range((F*E/(100+E))//D+1): ...
s901607611
p03599
u876742094
1596229275
Python
PyPy3 (7.3.0)
py
Runtime Error
89
74412
521
A,B,C,D,E,F=map(int,input().split()) weight=0 suger=0 c=0 for i in range(F//(100*A)+1): for j in range(F//(100*B)+1): for k in range(i*A+j*B)*E//C+1): for l in range((i*A+j*B)*E//D+1): if 100*(i*A+j*B)+k*C+l*D<=F and k*C+l*D<=(i*A+j*B)*E and (i*i+j*j+k*k+l*l)!=0 and (k*C+l*D)/(10...
s810216522
p03599
u786020649
1596081485
Python
Python (3.8.2)
py
Runtime Error
30
10036
462
import sys read=sys.stdin.read readline=sys.stdin.readline a,b,c,d,e,f=map(int,readline().split()) def searints(m,n,l):#m<=n mask=(1<<l+1)-1 s=sum([1<<n*i for i in range(1,l//n+1)])&mask for i in range(1,l//m+1): s=(s+1<<m*i|s) &mask return [x for x in range(0,l+1) if ((s+1)>>x)&1==1] w=searints(100*a,10...
s014664860
p03599
u815878613
1595922213
Python
Python (3.8.2)
py
Runtime Error
76
9728
1026
from copy import deepcopy import itertools A, B, C, D, E, F = map(int, input().split()) qA = [i // 100 for i in range(0, F + 1, A * 100)] qB = [i // 100 for i in range(0, F + 1, B * 100)] qC = [i for i in range(0, F + 1, C)] qD = [i for i in range(0, F + 1, D)] W = set(qA + qB) for i in range(F // min(A, B)): nW...
s339082969
p03599
u844789719
1595445877
Python
Python (3.8.2)
py
Runtime Error
118
27332
1189
import numpy as np def solve(stdin): A, B, C, D, E, F = stdin if A == 1: raise conc = -1 ans = (1, 2) for na in range(F // (100 * A) + 1): for nb in range(F // (100 * B) + 1): if na == nb == 0: continue G = F - na * 100 * A - nb * 100 * B ...
s017833935
p03599
u844789719
1595445499
Python
PyPy3 (7.3.0)
py
Runtime Error
123
74632
824
A, B, C, D, E, F = [int(_) for _ in input().split()] if A==1: raise def main(A, B, C, D, E, F): conc = -1 ans = (1, 2) for na in range(F // (100 * A) + 1): for nb in range(F // (100 * B) + 1): if na == nb == 0: continue G = F - na * 100 * A - nb * 100 * B ...
s137820022
p03599
u844789719
1595445424
Python
Python (3.8.2)
py
Runtime Error
124
9224
824
A, B, C, D, E, F = [int(_) for _ in input().split()] if A==1: raise def main(A, B, C, D, E, F): conc = -1 ans = (1, 2) for na in range(F // (100 * A) + 1): for nb in range(F // (100 * B) + 1): if na == nb == 0: continue G = F - na * 100 * A - nb * 100 * B ...
s051710796
p03599
u918601425
1595266587
Python
Python (3.8.2)
py
Runtime Error
33
10796
576
A,B,C,D,E,F=[int(s) for s in input().split()] #可能な水の量 w_able=set() for i in range(B): for j in range(F//(100*B)+1): w_able.add(100*(i*A+j*B)) w_able.remove(0) #可能な砂糖の量 s_able=set() for i in range(D): for j in range(F//D+1): s_able.add(i*C+j*D) s_able.remove(0) w_able=list(w_able) w_able.sort() s_able=list(s...
s653067670
p03599
u072717685
1595107884
Python
Python (3.8.2)
py
Runtime Error
23
8788
895
import sys sys.setrecursionlimit(10**6) read = sys.stdin.read readlines = sys.stdin.readlines from math import ceil def main(): a, b, c, d, e, f = map(int, input().split()) a *= 100 b *= 100 # 濃度0%のケース if e == 0 or min(a, b) == f: print(a, 0) sys.exit() water = [0] * 6001 wa...
s586023110
p03599
u668785999
1595028667
Python
Python (3.8.2)
py
Runtime Error
22
8912
2698
#include <iostream> // cout, endl, cin #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstd...
s000372326
p03599
u931938233
1595015263
Python
Python (3.8.2)
py
Runtime Error
75
9188
490
A,B,C,D,E,F=map(int,input().split(' ')) water = set() for a in range(0,F,100*A): for b in range(0,F,100*B): if a+b <= F: water.add(a+b) else: break sugars = set() for c in range(0,F,C): for d in range(0,F,D): if c+d <= F: sugars.add(c+d) else: break density = 0 for x in water...
s989329183
p03599
u169427364
1594496188
Python
Python (3.8.2)
py
Runtime Error
1676
9220
1084
from itertools import product A,B,C,D,E,F = map(int, input().split()) num_a = F // (100 * A) num_b = F // (100 * B) num_c = int((F * E / (E + 100)) // C) num_d = int((F * E / (E + 100)) // D) def check_w(w_mizu, w_sato, F): return w_mizu + w_sato <= F def check_tokeru(w_mizu, w_sato, E): return 100 * w_sato / (...
s011213523
p03599
u302789073
1594326391
Python
Python (3.8.2)
py
Runtime Error
1631
9380
971
a,b,c,d,e,f=[int(i) for i in input().split()] max_a=f//(100*a) max_b=f//(100*b) max_c=f//c max_d=f//d #水リスト x_list=[] for i in range(max_a+1): for j in range(max_b+1): #水 x=100*a*i+100*b*j if 0<x<f and x not in x_list: x_list.append(x) #print(x_list) #砂糖リスト y_list=...
s312034005
p03599
u514118270
1593839846
Python
PyPy3 (7.3.0)
py
Runtime Error
228
77416
975
import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() def i(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def L(): return list(input().split()) def l(): retur...
s884241501
p03599
u499381410
1593800014
Python
PyPy3 (7.3.0)
py
Runtime Error
210
83904
1666
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify import math import bisect import random from itertools import permutations, accumulate, combinations, product import sys import string from bisect import bisect_left, bisect_right from math import factorial, ceil, floor, co...
s886477254
p03599
u499381410
1593799982
Python
PyPy3 (7.3.0)
py
Runtime Error
344
83984
1676
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify import math import bisect import random from itertools import permutations, accumulate, combinations, product import sys import string from bisect import bisect_left, bisect_right from math import factorial, ceil, floor, co...
s500726412
p03599
u905203728
1593445835
Python
PyPy3 (7.3.0)
py
Runtime Error
97
74556
445
a,b,c,d,e,f=map(int,input().split()) a,b=a*100,b*100 DP=[-1 for _ in range(f+1)] DP[a],DP[b]=0,0 for i in range(f): if DP[i]==-1:continue for j in a,b: if i+j<=f:DP[i+j]=DP[i] for j in c,d: if i+j<=f and 100*(DP[i]+j)/(i+j)<=100*e/(100+e): DP[i+j]=DP[i]+j ans,water=0,[a,0] for ...
s604707982
p03599
u905203728
1593445688
Python
PyPy3 (7.3.0)
py
Runtime Error
95
74976
438
a,b,c,d,e,f=map(int,input().split()) a,b=a*100,b*100 DP=[-1 for _ in range(f+2)] DP[a],DP[b]=0,0 for i in range(f+1): if DP[i]==-1:continue for j in a,b: if i+j<=f:DP[i+j]=DP[i] for j in c,d: if i+j<=f and 100*(DP[i]+j)/(i+j)<=100*e/(100+e): DP[i+j]=DP[i]+j ans,water=0,[a,0] fo...
s285597228
p03599
u905203728
1593445545
Python
PyPy3 (7.3.0)
py
Runtime Error
93
74820
438
a,b,c,d,e,f=map(int,input().split()) a,b=a*100,b*100 DP=[-1 for _ in range(f+1)] DP[a],DP[b]=0,0 for i in range(f+1): if DP[i]==-1:continue for j in a,b: if i+j<=f:DP[i+j]=DP[i] for j in c,d: if i+j<=f and 100*(DP[i]+j)/(i+j)<=100*e/(100+e): DP[i+j]=DP[i]+j ans,water=0,[a,0] fo...
s639347384
p03599
u905203728
1593445222
Python
PyPy3 (7.3.0)
py
Runtime Error
90
74716
438
a,b,c,d,e,f=map(int,input().split()) a *=100 b *=100 DP=[-1 for _ in range(f+1)] DP[a],DP[b]=0,0 for i in range(f+1): if DP[i]==-1:continue for j in a,b: if i+j<=f:DP[i+j]=DP[i] for j in c,d: if i+j<=f and 100*(DP[i]+j)/(i+j)<=100*e/(100+e): DP[i+j]=DP[i]+j ans,water=0,[a,0] fo...
s885597018
p03599
u905203728
1593381733
Python
PyPy3 (7.3.0)
py
Runtime Error
84
75128
651
a,b,c,d,e,f=map(int,input().split()) DP=[[0,0] for _ in range(f+100)] DP[a*100][0]=a*100 DP[b*100][0]=b*100 for i in range(f+1): if DP[i][0]==0:continue for j in a,b: if i+j*100<=f: j *=100 if DP[i][1]*100/(i+j)>=DP[i+j][1]*100/(i+j): DP[i+j]=[i+j,DP[i][1]] ...
s742973948
p03599
u905203728
1593381168
Python
PyPy3 (7.3.0)
py
Runtime Error
91
74532
649
a,b,c,d,e,f=map(int,input().split()) DP=[[0,0] for _ in range(f+1)] DP[a*100][0]=a*100 DP[b*100][0]=b*100 for i in range(f+1): if DP[i][0]==0:continue for j in a,b: if i+j*100<=f: j *=100 if DP[i][1]*100/(i+j)>=DP[i+j][1]*100/(i+j): DP[i+j]=[i+j,DP[i][1]] fo...
s566242708
p03599
u905203728
1593380991
Python
PyPy3 (7.3.0)
py
Runtime Error
90
75004
629
a,b,c,d,e,f=map(int,input().split()) DP=[[0,0] for _ in range(f+1)] DP[a*100][0]=a*100 DP[b*100][0]=b*100 for i in range(f+1): if DP[i][0]==0:continue for j in a,b: if i+j*100<=f: j *=100 if DP[i][1]*100/(i+j)>=DP[i+j][1]*100/(i+j): DP[i+j]=[i+j,DP[i][1]] fo...
s423653101
p03599
u905203728
1593380590
Python
PyPy3 (7.3.0)
py
Runtime Error
103
74776
625
a,b,c,d,e,f=map(int,input().split()) DP=[[0,0] for _ in range(f+1)] DP[a*100][0]=a*100 DP[b*100][0]=b*100 for i in range(f+1): if DP[i][0]==0:continue for j in a,b: if i+j*100<=f: j *=100 if DP[i][1]*100/(i+j)>=DP[i+j][1]*100/(i+j): DP[i+j]=[i+j,DP[i][1]] fo...
s338642194
p03599
u391589398
1592750671
Python
PyPy3 (7.3.0)
py
Runtime Error
208
157904
589
a,b,c,d,e,f = map(int, input().split()) ws = [] for i in range(f//100//a+1): for j in range(f//100//b+1): w = 100*(a*i+b*j) if 0 < w < f: ws.append(w) if w >= f: break ss = [] for i in range((f-100*a)//c+1): for j in range((f-100*a)//d+1): s = c*i+d*j ...
s128230774
p03599
u391589398
1592749060
Python
Python (3.8.2)
py
Runtime Error
75
17124
509
a,b,c,d,e,f = map(int, input().split()) wvs = [] va = 0 while va <= f: va += 100*a vab = va while vab <= f: wvs.append(vab) vab += 100*b svs = [] vc = 0 while vc+100*a <= f: vc += c vcd = vc while vcd+100*a <= f: svs.append(vcd) vcd += d n = [] for w in wvs: ...
s162104640
p03599
u587589241
1592074486
Python
Python (3.4.3)
py
Runtime Error
2278
12436
609
import sys sys.setrecursionlimit(10 ** 7) A,B,C,D,E,F=map(int,input().split()) E=(100*E)/(100+E) M=[] S=[] for i in range(F//100*A+1): for j in range(F//100*B+1): t=i*100*A+j*100*B if t<=F and t!=0: M.append(t) for i in range(F//C+1): for j in range(F//D+1): ta=i*C+j*D ...
s975379570
p03599
u587589241
1592074393
Python
Python (3.4.3)
py
Runtime Error
2298
12436
578
import sys A,B,C,D,E,F=map(int,input().split()) E=(100*E)/(100+E) M=[] S=[] for i in range(F//100*A+1): for j in range(F//100*B+1): t=i*100*A+j*100*B if t<=F and t!=0: M.append(t) for i in range(F//C+1): for j in range(F//D+1): ta=i*C+j*D if ta<=F and ta!=0: ...
s804501867
p03599
u587589241
1592074238
Python
Python (3.4.3)
py
Runtime Error
2777
14584
577
import sys A,B,C,D,E,F=map(int,input().split()) E=(100*E)/(100+E) M=[] S=[] for i in range(F//100*A+1): for j in range(F//100*B+1): t=i*100*A+j*100*B if t<=F and t!=0: M.append(t) for i in range(F//C+1): for j in range(F//D+1): ta=i*C+j*D if ta<=F and ta!=0: ...
s168904233
p03599
u587589241
1592073949
Python
Python (3.4.3)
py
Runtime Error
2599
12436
509
A,B,C,D,E,F=map(int,input().split()) E=(100*E)/(100+E) M=[] S=[] for i in range(F//100*A+1): for j in range(F//100*B+1): t=i*100*A+j*100*B if t<=F and t!=0: M.append(t) for i in range(F//C+1): for j in range(F//D+1): ta=i*C+j*D if ta<=F and ta!=0: S.append...
s198609244
p03599
u587589241
1592073859
Python
Python (3.4.3)
py
Runtime Error
2176
12436
499
A,B,C,D,E,F=map(int,input().split()) E=(100*E)/(100+E) M=[] S=[] for i in range(F//100*A+1): for j in range(F//100*B+1): t=i*100*A+j*100*B if t<=F and t!=0: M.append(t) for i in range(F//C+1): for j in range(F//D+1): ta=i*C+j*D if ta<=F: S.append(ta) tmp=0...
s677163531
p03599
u587589241
1592073694
Python
Python (3.4.3)
py
Runtime Error
2339
12436
493
A,B,C,D,E,F=map(int,input().split()) E=E/(100+E) M=[] S=[] for i in range(F//100*A+1): for j in range(F//100*B+1): t=i*100*A+j*100*B if t<=F and t!=0: M.append(t) for i in range(F//C+1): for j in range(F//D+1): ta=i*C+j*D if ta<=F: S.append(ta) tmp=0 for x...
s351276945
p03599
u587589241
1592073264
Python
Python (3.4.3)
py
Runtime Error
2282
12436
481
A,B,C,D,E,F=map(int,input().split()) M=[] S=[] for i in range(F//100*A+1): for j in range(F//100*B+1): t=i*100*A+j*100*B if t<=F and t!=0: M.append(t) for i in range(F//C+1): for j in range(F//D+1): ta=i*C+j*D if ta<=F: S.append(ta) tmp=0 for x in M: f...
s446953314
p03599
u587589241
1592073211
Python
Python (3.4.3)
py
Runtime Error
2301
12436
471
A,B,C,D,E,F=map(int,input().split()) M=[] S=[] for i in range(F//100*A+1): for j in range(F//100*B+1): t=i*100*A+j*100*B if t<=F and t!=0: M.append(t) for i in range(F//C+1): for j in range(F//D+1): ta=i*C+j*D if ta<=F: S.append(ta) tmp=0 for x in M: f...
s592942049
p03599
u489959379
1591928781
Python
PyPy3 (2.4.0)
py
Runtime Error
193
41580
947
import sys sys.setrecursionlimit(10 ** 7) input = sys.stdin.readline f_inf = float('inf') mod = 10 ** 9 + 7 def resolve(): A, B, C, D, E, F = map(int, input().split()) W = set() for a in range(F // (100 * A) + 1): for b in range(F // (100 * B) + 1): if 0 < 100 * A * a + 100 * B * b <=...
s642719010
p03599
u707124227
1591843159
Python
Python (3.4.3)
py
Runtime Error
189
3064
657
a,b,c,d,e,f=map(int,input().split()) able_water=[] for na in range(1+f//(a*100)): for nb in range(1+(f-na*a*100)//(b*100)): water=na*a*100+nb*b*100 if water<=f: able_water.append(water) able_water.sort() import bisect ans=[0,0,0] max_s=f//100*e for nd in range(1+max_s//d): for nc in range(1+(max_s-nd*...
s974317226
p03599
u029000441
1591631539
Python
PyPy3 (2.4.0)
py
Runtime Error
164
38256
1486
# coding: utf-8 # hello worldと表示する import sys import numpy input = sys.stdin.readline sys.setrecursionlimit(10**7) from collections import Counter, deque from collections import defaultdict from itertools import combinations, permutations, accumulate, groupby, product from bisect import bisect_left,bisect_right from he...
s237753608
p03599
u029000441
1591631498
Python
PyPy3 (2.4.0)
py
Runtime Error
184
40048
1517
# coding: utf-8 # hello worldと表示する import sys import numpy input = sys.stdin.readline sys.setrecursionlimit(10**7) from collections import Counter, deque from collections import defaultdict from itertools import combinations, permutations, accumulate, groupby, product from bisect import bisect_left,bisect_right from he...
s796833104
p03599
u029000441
1591630375
Python
Python (3.4.3)
py
Runtime Error
549
12432
1480
# coding: utf-8 # hello worldと表示する import sys import numpy input = sys.stdin.readline sys.setrecursionlimit(10**7) from collections import Counter, deque from collections import defaultdict from itertools import combinations, permutations, accumulate, groupby, product from bisect import bisect_left,bisect_right from he...
s098315216
p03599
u629350026
1591147510
Python
Python (3.4.3)
py
Runtime Error
17
3064
745
a,b,c,d,e,f=map(int,input().split()) i=0 answ=0 anss=0 cnt=0 while 100*a*i<=f: j=0 while 100*a*i+100*b*j<=f: k=0 while c*k<=(a*i+b*j)*e: l=((a*i+b*j)*e-c*k)//d if (a*i+b*j+c*k+d*l)!=0: if cnt<100*(c*k+d*l)/(a*i+b*j+c*k+d*l): if (a*i+b*j)*100+c*k+d*l<=f: cnt=100*(c*k...
s043546597
p03599
u936985471
1590958233
Python
Python (3.4.3)
py
Runtime Error
18
3064
877
import sys readline = sys.stdin.readline # A + Bの組み合わせはせいぜい1~30のうち作れる数字のみなので全探索 A,B,C,D,E,F = map(int,readline().split()) if E == 0: print(min(A,B) * 100, 0) exit(0) ans = [0,0] maxrate = 0.0 for a in range(0,F,100 * A): for b in range(0,F,100 * B): if a == 0 and b == 0: continue if a + b > F: ...