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
s562388627
p03834
u127856129
1521468620
Python
Python (3.4.3)
py
Runtime Error
18
2940
31
print(input().replace(","." "))
s498296859
p03834
u192903163
1520799823
Python
Python (3.4.3)
py
Runtime Error
17
3064
41
a = str(input()) print a.replace(","," ")
s399257487
p03834
u632369368
1520756773
Python
Python (3.4.3)
py
Runtime Error
17
2940
39
s = input() print(s.replase(',', ' '))
s502690484
p03834
u319612498
1519005073
Python
Python (3.4.3)
py
Runtime Error
18
2940
48
s=input().split() print(s[0]+" "+s[1]+" "+s[2])
s543681305
p03834
u319612498
1519005039
Python
Python (3.4.3)
py
Runtime Error
17
2940
51
s=input().split() print(s[0]+" "+s[1]+" "+s[2]+" ")
s166340503
p03834
u019584841
1518908584
Python
Python (3.4.3)
py
Runtime Error
17
2940
43
a,b,c=input().split(,) print(a+" "+b+" "+c)
s372172197
p03834
u898651494
1517863399
Python
Python (3.4.3)
py
Runtime Error
17
2940
140
l = input() for i in range(0, 5) print(l[i], end="") for j in range(6, 13) print(l[j], end="") for k in range(14, 19) print(l[k], end="")
s460887000
p03834
u898651494
1517863319
Python
Python (3.4.3)
py
Runtime Error
17
2940
146
l = input() for i in range(0, 5)  print(l[i], end="") for j in range(6, 13)  print(l[j], end="") for k in range(14, 19)  print(l[k], end="")
s257845154
p03834
u898651494
1517863279
Python
Python (3.4.3)
py
Runtime Error
18
3064
146
l = input() for i in range(0, 5)  print(l[i], end="") for i in range(6, 13)  print(l[i], end="") for i in range(14, 19)  print(l[i], end="")
s174647028
p03834
u748135969
1516229909
Python
Python (3.4.3)
py
Runtime Error
17
2940
37
a = input() print(a.replace(',', ' ')
s216738989
p03834
u667024514
1510776192
Python
Python (3.4.3)
py
Runtime Error
18
3060
145
a = input() a[5] = " " a[13] = " " print(a[0]+a[1]+a[2]+a[3]+a[4]+a[5]+a[6]+a[7]+a[8]+a[9]+a[10]+a[11]+a[12]+a[13]+a[14]+a[15]+a[16]+a[17]+a[18])
s985433999
p03834
u785205215
1507443562
Python
Python (3.4.3)
py
Runtime Error
18
2940
176
def readLine_str_list():return list(map(str, stdin.readline().split(','))) def main(): s = readLine_str_list() print(' '.join(s)) if __name__ == "__main__": main()
s844422434
p03834
u396039692
1486862924
Python
Python (3.4.3)
py
Runtime Error
22
3064
69
a = raw_input() b = a.split(",") printf(b[0] + " " +b[1] + " " +b[2])
s199879999
p03834
u203900263
1484972260
Python
Python (3.4.3)
py
Runtime Error
24
3064
67
haiku = input() haiku = haiku.replace(“r”,” “) print(haiku)
s314606405
p03834
u359930418
1484337131
Python
Python (3.4.3)
py
Runtime Error
23
3064
69
list = ["haiku", "atcorder", "pytho"] print(list.replace("," , " "))
s371506119
p03834
u514809528
1484110984
Python
Python (3.4.3)
py
Runtime Error
23
3064
51
S = raw_input(); S = S.replace(",", " "); print(S);
s942778433
p03834
u966695411
1483887640
Python
PyPy3 (2.4.0)
py
Runtime Error
248
41200
179
import itertools K, S = map(int, input().split()) s = set([x for x in itertools.combinations_with_replacement(range(K+1), 3) if sum(x) == S]) print(len(s) * 3 - (S % 3 == 0) * 2)
s731663468
p03834
u332385682
1483844278
Python
Python (3.4.3)
py
Runtime Error
22
3188
200
K, S = map(int, input().split()) wariate = 0 for x in range(0, K + 1): if S - x <= K: wariate += max(S - x + 1, 0) else: wariate += max(0, 2 * K - (S - x) + 1) print(wariate)
s784441290
p03834
u093843560
1483844190
Python
Python (2.7.6)
py
Runtime Error
16
2568
146
#-*-coding = utf-8 -*- # カンマ区切りの文字の入力 a,b,c = map(str, raw_input().split(",")) # 文字列の入力 print a+ " "+b+" "+c
s521346939
p03834
u325144984
1483843062
Python
Python (3.4.3)
py
Runtime Error
23
3192
110
[a, b] = map(int, input().split()) if a*3==b: print(1) elif b%3==0: print(b*3+1) else: print(b*3)
s712424837
p03834
u429995021
1483842474
Python
Python (3.4.3)
py
Runtime Error
23
3192
660
def main(): sx,sy,tx,ty = map(int,input().split()) root = "" # first for n in range(tx - sx): root += "R" for n in range(ty - sy): root += "U" # first back for n in range(tx - sx): root += "L" for n in range(ty - sy): root += "D" # first root +...
s133899471
p03834
u822353071
1483841555
Python
Python (3.4.3)
py
Runtime Error
23
3064
50
#001 a = raw_input() a=a.replace(',',' ') print(a)
s766630597
p03834
u757184416
1483841443
Python
Python (3.4.3)
py
Runtime Error
22
3064
68
import sys s=sys.stdin.readline() print s[:5]+' '+s[6:13]+' '+s[14:]
s679020988
p03834
u140672616
1483841198
Python
Python (3.4.3)
py
Runtime Error
22
3064
30
print(input().replace(","," ")
s954352513
p03834
u829564204
1483841047
Python
Python (3.4.3)
py
Runtime Error
23
3064
93
import fileinput for line in fileinput.input(): a = line.split(",") print " ".join(a)
s914518708
p03835
u072964737
1600293386
Python
Python (3.8.2)
py
Runtime Error
20
8932
200
K,S = map(int,input().split()) count = 0 for i in range(K+1): for j in range(K+1): for k in range(K+1): if i+j+k = S: count += 1 print(count)
s875022956
p03835
u582599197
1599571698
Python
PyPy3 (7.3.0)
py
Runtime Error
110
74672
333
# coding: utf-8 # Your code here! import itertools import pandas as pd k, s = map(int, input().split()) lst = [i for i in range(k+1)] prod = itertools.product(lst, repeat=3) frame = pd.DataFrame(list(prod)) frame['ans'] = frame[0]+frame[1]+frame[2] s_bool = (frame['ans'] ==s) ans = 0 ans = s_bool.sum() print(a...
s232227190
p03835
u582599197
1599571669
Python
Python (3.8.2)
py
Runtime Error
25
9088
171
# coding: utf-8 # Your code here! import pandas as pd k, s = map(int, input().split()) lst = [i for i in range(k+1)] ans = 0 ans = s_bool.sum() print(ans)
s498757615
p03835
u582599197
1599571601
Python
Python (3.8.2)
py
Runtime Error
28
8952
86
# coding: utf-8 # Your code here! ans = 0 ans = s_bool.sum() print(ans)
s707819921
p03835
u582599197
1599571572
Python
Python (3.8.2)
py
Runtime Error
21
9124
150
# coding: utf-8 # Your code here! k, s = map(int, input().split()) lst = [i for i in range(k+1)] ans = 0 ans = s_bool.sum() print(ans)
s560566422
p03835
u582599197
1599571532
Python
Python (3.8.2)
py
Runtime Error
20
9016
71
# coding: utf-8 # Your code here! import itertools import pandas as pd
s727239798
p03835
u582599197
1599571512
Python
Python (3.8.2)
py
Runtime Error
25
8996
83
import itertools import pandas as pd k, s = map(int, input().split())
s798308565
p03835
u582599197
1599571469
Python
Python (3.8.2)
py
Runtime Error
28
8920
188
# coding: utf-8 # Your code here! import itertools import pandas as pd k, s = map(int, input().split()) lst = [i for i in range(k+1)] ans = 0 ans = s_bool.sum() print(ans)
s582760851
p03835
u582599197
1599571409
Python
Python (3.8.2)
py
Runtime Error
24
8984
333
# coding: utf-8 # Your code here! import itertools import pandas as pd k, s = map(int, input().split()) lst = [i for i in range(k+1)] prod = itertools.product(lst, repeat=3) frame = pd.DataFrame(list(prod)) frame['ans'] = frame[0]+frame[1]+frame[2] s_bool = (frame['ans'] ==s) ans = 0 ans = s_bool.sum() print(a...
s461807602
p03835
u582599197
1599571370
Python
PyPy3 (7.3.0)
py
Runtime Error
87
74812
325
# coding: utf-8 # Your code here! import itertools import pandas as pd k, s = map(int, input().split()) lst = [i for i in range(k+1)] prod = itertools.product(lst, repeat=3) frame = pd.DataFrame(list(prod)) frame['ans'] = frame[0]+frame[1]+frame[2] s_bool = (frame['ans'] ==s) ans = s_bool.sum() print(ans) ...
s994030339
p03835
u582599197
1599571342
Python
Python (3.8.2)
py
Runtime Error
26
8916
325
# coding: utf-8 # Your code here! import itertools import pandas as pd k, s = map(int, input().split()) lst = [i for i in range(k+1)] prod = itertools.product(lst, repeat=3) frame = pd.DataFrame(list(prod)) frame['ans'] = frame[0]+frame[1]+frame[2] s_bool = (frame['ans'] ==s) ans = s_bool.sum() print(ans) ...
s650641018
p03835
u582599197
1599571308
Python
PyPy2 (7.3.0)
py
Runtime Error
334
85028
325
# coding: utf-8 # Your code here! import itertools import pandas as pd k, s = map(int, input().split()) lst = [i for i in range(k+1)] prod = itertools.product(lst, repeat=3) frame = pd.DataFrame(list(prod)) frame['ans'] = frame[0]+frame[1]+frame[2] s_bool = (frame['ans'] ==s) ans = s_bool.sum() print(ans) ...
s619653323
p03835
u582599197
1599571209
Python
PyPy2 (7.3.0)
py
Runtime Error
60
64352
322
# coding: utf-8 # Your code here! import itertools import pandas as pd k, s = map(int, input().split()) lst = [i for i in range(k)] prod = itertools.product(lst, repeat=3) frame = pd.DataFrame(list(prod)) frame['ans'] = frame[0]+frame[1]+frame[2] s_bool = (frame['ans'] ==s) ans = s_bool.sum() print(ans) ...
s003204472
p03835
u582599197
1599571102
Python
PyPy2 (7.3.0)
py
Runtime Error
353
85292
323
# coding: utf-8 # Your code here! import itertools import pandas as pd k, s = map(int, input().split()) lst = [i+1 for i in range(k)] prod = itertools.product(lst, repeat=3) frame = pd.DataFrame(list(prod)) frame['ans'] = frame[0]+frame[1]+frame[2] s_bool = (frame['ans'] ==s) ans = s_bool.sum() print(ans) ...
s047058702
p03835
u620846115
1599559726
Python
Python (3.8.2)
py
Runtime Error
613
9144
99
k,s=map(int,input().split()) print(len([z for x in range(k+1) for y in range(k+1) if 0<=s-x-y<=k]))
s214892532
p03835
u620846115
1599559468
Python
Python (3.8.2)
py
Runtime Error
24
9092
103
s,k=map(int,input().split()) print(len([z for x in range(0,k+1) for y in range(0,k+1) if 0<=s-x-y<=k]))
s063027102
p03835
u620846115
1599559413
Python
Python (3.8.2)
py
Runtime Error
24
8564
101
s,k=map(int,input().split()) print(len[z for x in range(0,k+1) for y in range(0,k+1) if 0<=s-x-y<=k])
s255839626
p03835
u620846115
1599558825
Python
Python (3.8.2)
py
Runtime Error
2205
9064
230
K,S = map(int,input().split()) import math if K>=S: print(math.factorial(S+1)) else: count=0 for i in range(0,K+1): for j in range(0,K+1): for h in range(0,K+1): if i+j+h==S: count+=1 print(count)
s585636506
p03835
u783675879
1599183743
Python
PyPy3 (7.3.0)
py
Runtime Error
95
74676
41961
#define _CRT_SECURE_NO_WARNINGS #pragma warning(disable: 4244) // 最悪をします #include <iostream> #include <cmath> #include <algorithm> #include <vector> #include <numeric> #include <queue> #include <stack> #include <map> #include <set> #include <string> #include <functional> #include <list> #include <random> #include <tim...
s085442607
p03835
u794448346
1598553757
Python
Python (3.8.2)
py
Runtime Error
26
9140
394
x = y = S//3 + 1 z = S - x - y if z < y: x = z z = y while 0 <= x <= y and 0 <= y <= K and y <= z <= K: while 0 <= x and z <= K: if x == y == z: ans += 1 elif x == y or y == z: ans += 3 else: ans += 6 x -= 1 z += 1 y += 1 x ...
s564014665
p03835
u677393869
1598497763
Python
Python (3.8.2)
py
Runtime Error
24
8792
148
K, S = [int(x) for x in input().split()] ans = 0 for x in range(K+1): for y in range(K+1): if S-x-y =< K: ans +=1 print(ans)
s759766389
p03835
u677393869
1598497703
Python
Python (3.8.2)
py
Runtime Error
25
8968
148
K, S = [str(x) for x in input().split()] ans = 0 for x in range(K+1): for y in range(K+1): if S-x-y =< K: ans +=1 print(ans)
s075290718
p03835
u604839890
1598237925
Python
Python (3.8.2)
py
Runtime Error
25
9036
407
k, s = map(int, input().split()) ans = 0 for x in range(k+1): if x > s: break if x+k+k < s: continue for y in range(k+1): xy = x+y if xy > s: break if xy+k < s: continue: for z in range(k+1): xyz = x+y+z if xyz ...
s895251686
p03835
u940652437
1598229967
Python
Python (3.8.2)
py
Runtime Error
25
9128
230
K,S = map(int,input().split()) count = 0 for i in range(0,K+1): X = i for j in range(0,K+1): Y = j for k in range(0,K+1): Z = k if ( ty == S): count += 1 print(count)
s438032250
p03835
u070423038
1598172245
Python
Python (3.8.2)
py
Runtime Error
27
8940
148
K, S = map(int, input().split()) count = 0 for i in range(K+1): for j in range(K+1): if 0<=S-i-j<=K: count += 1 print(count
s072989526
p03835
u072964737
1597267163
Python
Python (3.8.2)
py
Runtime Error
21
8984
140
K,S = map(int,input().split()) count = 0 for i in range(K+1): for j in range(K+1): if 0 <= S-(i+j) <= K count += 1 print(count)
s202341611
p03835
u072964737
1597266935
Python
Python (3.8.2)
py
Runtime Error
27
8700
157
K,S = map(int,input().split()) count = 0 for i in range(K): for j in range(K): for l in range(K): if i+j+l = S: count += 1 print(count)
s813856838
p03835
u609176437
1596680188
Python
Python (3.8.2)
py
Runtime Error
27
9144
119
k,s=map(int,input().split()) asn=o for i in range(k+1): for j in range(k+1): if 0<=s-i-j<=k: ans+=1 print(ans)
s054418777
p03835
u185806788
1596618990
Python
PyPy3 (7.3.0)
py
Runtime Error
102
74816
130
r,g=map(int,input().split()) X=0 for i in range(g+1): for j in range(g+1): k=g-i-j if k>=0 and k<=n: X+=1 print(X)
s103844136
p03835
u181424364
1596569217
Python
Python (3.8.2)
py
Runtime Error
23
8956
197
k, s = map(int, input().split()) ans = 0 for i in range(k+1): for j in range(k+1): l = s-i-j if i + j + l == s and l>=0 ans += 1 print(ans)
s310027657
p03835
u181424364
1596569144
Python
Python (3.8.2)
py
Runtime Error
22
8784
209
k, s = map(int, input().split()) #k, s = 5,15 ans = 0 for i in range(k+1): for j in range(k+1): l = s-i-j if i + j + l == s and l>0 ans += 1 print(ans)
s414715229
p03835
u181424364
1596569098
Python
Python (3.8.2)
py
Runtime Error
30
8844
209
k, s = map(int, input().split()) #k, s = 5,15 ans = 0 for i in range(k+1): for j in range(k+1): l = s-x-y if i + j + l == s and l>0 ans += 1 print(ans)
s503913560
p03835
u181424364
1596568545
Python
Python (3.8.2)
py
Runtime Error
27
8972
249
k, s = map(int, input().split) #k, s = 5,15 ans = 0 for i in range(k+1): x = i for j in range(k+1): y = j for l in range(k+1): z = l if x + y + z == s: ans += 1 print(ans)
s977681510
p03835
u181424364
1596568426
Python
Python (3.8.2)
py
Runtime Error
20
8940
218
#k, s = 5,15 ans = 0 for i in range(k+1): x = i for j in range(k+1): y = j for l in range(k+1): z = l if x + y + z == s: ans += 1 print(ans)
s912031907
p03835
u168573507
1596229813
Python
Python (3.8.2)
py
Runtime Error
21
9076
215
K = int(input()) S = int(input()) ans = 0 for i in range(0,K+1): for j in range (0,K+1): for k in range (0,K+1): if (i + j + k) == S: ans = ans + 1 print(ans)
s688205564
p03835
u177775074
1595955127
Python
Python (3.8.2)
py
Runtime Error
26
9040
155
k,s = map(int ,input.split()) cou = 0 for i in range(k) : for j in range(k): for h in range(k): if i + j + h == s: cou += 1 print(cou)
s158529503
p03835
u786020649
1594925535
Python
Python (3.8.2)
py
Runtime Error
27
8892
161
k,s=map(int,input().split()) c=0 m=min(s,k) for x in range(m+1): for y in range(m+1-x) for z in range(m+1-x-y) if x+y+z==s: c+=1 print(c)
s335069454
p03835
u594604385
1594914589
Python
Python (3.8.2)
py
Runtime Error
24
8960
460
import sys sys.setrecursionlimit(10 ** 5) # sys.stdin = open('input.txt', 'r') # sys.stdout = open('output.txt', 'w') # readline =sys.stdin.readline # time - O(n2) def process(): k,s = map(int,readline().rstrip().split()) cnt=0 for i in range(0,k+1): for j in range(0,k+1): z = s-(i+...
s654376154
p03835
u185806788
1594690522
Python
PyPy3 (7.3.0)
py
Runtime Error
181
74312
147
K,S=map(int,input().split()) ans=0 for x in range(K+1): for y in range(K+1): for z in range(K+1): if x+y+z=S: ans+=1 print(ans)
s586639707
p03835
u573701772
1594226626
Python
Python (3.8.2)
py
Runtime Error
20
8952
290
input=input().split(" ") K=int(input[0]) S=int(input[1]) box=[] for n in range(K+1): box.append(n) count=0 for xx in range(K+1): for yy in range(K+1): for zz in range(K+1): t=box[xx]+box[yy]+box[zz] if t== S: count+=1 print(str(count))
s178136060
p03835
u573701772
1594226110
Python
Python (3.8.2)
py
Runtime Error
24
8936
286
input=input().split() K=int(input[0]) S=int(input[1]) box=[] for n in range(K+1): box.append(n) count=0 for xx in range(K+1): for yy in range(K+1): for zz in range(K+1): t=box[xx]+box[yy]+box[zz] if t== S: count+=1 print(str(count))
s415695585
p03835
u369079926
1593668694
Python
Python (3.8.2)
py
Runtime Error
24
9024
242
import sys k,s = map(int,sys.stdin.buffer.readline().split(' ')) result = 0 for x in range(k+1): for y in range(min(s-x+1,k+1)): z = s-x-y if z < 0: continue if z<=k: result+=1 print(result)
s974361686
p03835
u492910842
1593570903
Python
PyPy3 (7.3.0)
py
Runtime Error
98
74676
121
k,s=map(int,input().split()) ans=0 for i in range(k+1): for j in range(k+1-i): if s-i-j<=2500 ans+=1 print(ans)
s738394748
p03835
u634046173
1593303880
Python
Python (3.8.2)
py
Runtime Error
24
8836
147
K, S = map(int,input()split()) c = 0 for i in range(K+1): for j in range(K+1): z = S - i - j if 0 <= z and z <= K: c += 1 print(c)
s947514730
p03835
u253011685
1592488902
Python
Python (3.4.3)
py
Runtime Error
17
2940
298
#include <bits/stdc++.h> using namespace std; int main() { int k,s; cin >> k>>s; int count=0; for(int x=0; x<k+1; x++){ for(int y=0; y<k+1; y++){ for(int z=0; z<k+1; z++){ if(x+y+z==s){ count++; } } } } cout << count << endl; }
s335572189
p03835
u925406312
1592176320
Python
Python (3.4.3)
py
Runtime Error
17
2940
194
a = int(input()) b = int(input()) flag = 0 for x in range(a + 1): for y in range(a + 1): for z in range(a + 1): if x + y + z ==b: flag +=1 print(flag)
s804426298
p03835
u925406312
1592175963
Python
Python (3.4.3)
py
Runtime Error
17
3056
195
a,b = [int(input())for i in range(2)] flag = 0 for x in range(a + 1): for y in range(a + 1): for z in range(a + 1): if x + y + z ==b: flag +=1 print(flag)
s014924783
p03835
u996996256
1592053314
Python
Python (2.7.6)
py
Runtime Error
10
2568
192
k, s = list(map(int, input().split())) count = 0 for i in range(k+1): for j in range(k+1): for n in range(k+1): if (i+j+n == k): count += 1 print(count)
s830523011
p03835
u996996256
1592053167
Python
Python (2.7.6)
py
Runtime Error
10
2568
172
k, s = list(map(int, input().split())) count = 0 for i in range(k+1): for j in range(k+1): if (s-i-j <= k) and (0 <= s-i-j): count += 1 print(count)
s254036775
p03835
u996996256
1592053070
Python
Python (2.7.6)
py
Runtime Error
11
2568
176
k, s = list(map(int, input().split())) count = 0 for i in range(2,k+1): for j in range(2,k+1): if (s-i-j <= k) and (0 <= s-i-j): count += 1 print(count)
s166498348
p03835
u582614471
1591668957
Python
Python (3.4.3)
py
Runtime Error
17
2940
165
k,s = map(int,input().split()) f = 0 for i in range(k): for j in range(k): for l in range(k): if sum(i,j,l)==s: f+=1 print(f)
s264308465
p03835
u582614471
1591668922
Python
Python (3.4.3)
py
Runtime Error
17
2940
165
k,s = map(int,input().split()) f = 0 for i in range(k): for j in range(k): for l in range(k): if sum(i,j,k)==s: f+=1 print(f)
s243061685
p03835
u350093546
1591615901
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38256
141
cnt=0 k,s=map(int,input().split()) for i in range(k+1): for j in range(k+1): if (0<=s-x-y<=k): cnt+=1 print(cnt)
s128409763
p03835
u757274384
1591417983
Python
Python (3.4.3)
py
Runtime Error
18
3060
240
k,s = map(int, input().split()) l = 0 if s <= k: l = int((k+2)(k+1)/2) else: for x in range(0,k+1): if s-x > 2*k: l += 0 elif k < s-x <= 2*k: l += 2*k - s + x + 1 elif s-x <= k: l += s-x+1 print(l)
s140369525
p03835
u757274384
1591417946
Python
Python (3.4.3)
py
Runtime Error
17
2940
237
k,s = map(int, input().split()) l = 0 if s <= k: l = int((k+2)(k+1)/2) else: for x in range(0,k+1): if s-x > 2k: l += 0 elif k < s-x <= 2k: l += 2*k - s + x + 1 elif s-x <= k: l += s-x+1 print(l)
s478248568
p03835
u294542073
1591397533
Python
Python (3.4.3)
py
Runtime Error
20
3064
252
k,s = map(int,input().split()) ans = 0 # 0もあるからレンジはk+1 for x in range(k+1): for y in range(k+1): z = s-(x+y) if z >= 0 and z <= k #zの範囲を間違えないように注意 ans += 1 print(ans)
s406644457
p03835
u868982936
1591302127
Python
Python (3.4.3)
py
Runtime Error
17
2940
117
K, S = map(int, input().split()) cnt = 0 for x, y, z in range(K+1): if x + y + z == S: cnt += 1 print(cnt)
s010665331
p03835
u868982936
1591301936
Python
Python (3.4.3)
py
Runtime Error
17
2940
111
K, S = map(int, input().split()) cnt = 0 for x, y, z in range(K): if x+y+z == S: cnt += 1 print(cnt)
s413768381
p03835
u730769327
1591239380
Python
PyPy3 (2.4.0)
py
Runtime Error
162
38256
117
k,s=map(int,input()) count=0 for x in range(k+1): for y in range(k+1): if x+y>s-k: count +=1 print(count)
s546300548
p03835
u548525760
1591070539
Python
Python (3.4.3)
py
Runtime Error
19
3188
239
ks = list(map(int, input().split())) k = min(ks) ans = 0 for x in range(k+1): for y in range(k+1): for z in range(k+1): if s == x + y + z: ans += 1 else: pass print(ans)
s697771180
p03835
u401390528
1590988165
Python
PyPy3 (2.4.0)
py
Runtime Error
2111
232724
681
K,S=map(int,input().split()) if 2<=K<=2500 and 0<=S<=3*K: Ks=[] wa=[] for i in range(K+1): Ks.append(i) X,Y,Z =Ks,Ks,Ks for x in X: if x<=S: X_=[] X_.append(x) for y in Y: if y<=S: X_Y_=[] X_Y...
s460700377
p03835
u290187182
1590938238
Python
Python (3.4.3)
py
Runtime Error
18
2940
256
if __name__ == '__main__': sys.setrecursionlimit(10 ** 6) b, c = map(int, input().split()) num = b*3 -c if num == 0: num =1 else: if num > b: num = b*3 else: num = num *3 print(num)
s551406563
p03835
u313291636
1590780468
Python
PyPy3 (2.4.0)
py
Runtime Error
160
38256
201
k, s = map(int, input().split()) count = 0 for x in range(k + 1): x = i for y in range(k + 1): if (s - x - y >= 0 and s - x - y <= k): count += 1 print(count)
s647098873
p03835
u313291636
1590777107
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38256
221
k, s = int(input().split()) count = 0 for i in range(k): x = i for j in range(k): y = j for l in range(k): z = l if x + y + z == s: count += 1 print(count)
s372226711
p03835
u494037809
1590085396
Python
Python (3.4.3)
py
Runtime Error
17
2940
291
K, S = map(int, input().split()) count = 0 for x in range(K+1): if S-x<=2*K: for y in range(K+1): if S-x-y<=K: cout += S-x-y+1 # for z in range(K+1): # if x+y+z==S: # count += 1 print(count)
s357461140
p03835
u091489347
1589850270
Python
Python (3.4.3)
py
Runtime Error
18
2940
156
count= 0 #全探索は時計が切れる for x in range(k+1): for y in range(k+1): if 0 <= s - (x +y) <= k: count += 1 print(count)
s131055659
p03835
u846385882
1589804390
Python
Python (3.4.3)
py
Runtime Error
17
2940
184
k,s=map(int,input(),split()) #k=2 #s=2 result=0 for x in range(k+1): for y in range(k+1): z=s-x-y if 0<=z and z<=k: result+=1 print(result)
s033406702
p03835
u846385882
1589804327
Python
Python (3.4.3)
py
Runtime Error
17
2940
197
k,s=map(int,input(),split()) #k=2 #s=2 result=0 for x in range(k+1): for y in range(k+1): z=s-x-y if 0<=z and z<=k: result+=1 print(result)
s325447985
p03835
u846385882
1589804279
Python
Python (3.4.3)
py
Runtime Error
17
2940
209
k,s=map(int,input(),split()) #k=2 #s=2 result=0 for x in range(k+1): for y in range(k+1): z=s-x-y if 0<=z and z<=k: result+=1 print(result)
s293623761
p03835
u846385882
1589804136
Python
Python (3.4.3)
py
Runtime Error
17
2940
187
k,s=map(int,input(),split()) ans=0 for x in range(k): for y in range(k): z=S-x-y if 0<=s and z<=k: ans+=1 print(ans)
s504503409
p03835
u846385882
1589804103
Python
Python (3.4.3)
py
Runtime Error
17
2940
191
k,s=map(int,input(),split()) ans=0 for x in range(k+1): for y in range(k+1): z=S-x-y if 0<=s and z<=k: ans+=1 print(ans)
s653304848
p03835
u714300041
1589759478
Python
Python (3.4.3)
py
Runtime Error
148
12228
222
import sys input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) import bisect import numpy as np num = 0 for x in range(K+1): tmp = min(S-x, K) - max(0, S-K-x) if tmp >= 0: num += tmp + 1 print(num)
s007864327
p03835
u629350026
1589659317
Python
Python (3.4.3)
py
Runtime Error
98
3060
228
k,s=map(int,input().split()) x=[0]*k for i in range(0,k): x[i]=i x.append(k) a=int(s/3)-1 count=0 for i in range(0,len(x)): stemp=s-x[i] for j in range(0,stemp+1): if s-x[i]-x[j] in x: count=count+1 print(count)
s060245210
p03835
u156383602
1589654465
Python
Python (3.4.3)
py
Runtime Error
1236
3060
203
k,s=map(int,input().split()) ans=0 z=[i for i in range(k+1)] for x in range(k+1): for y in range(k+1): a=s-x-y if a<=k and z[bisect.bisect_left(z,a)]==a: ans+=1 print(ans)
s144598421
p03835
u156383602
1589654279
Python
Python (3.4.3)
py
Runtime Error
17
3060
226
k,s=map(int,input().split()) ans=0 z=[i for i in range(k+1)] for x in range(k+1): for y in range(k+1): a=s-x-y a=min(s-x-y,k) if z[bisect.bisect_left(z,a)]==a: ans+=1 print(ans)