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
s233907903
p04029
u863850961
1599706398
Python
Python (3.8.2)
py
Runtime Error
28
9060
362
s=input() list_s=list(s) element='B' l1=['0','1','B'] for i in range(0,len(list_s)-i): if(list_s[i] == element): index_element=list_s[i-1] if(index_element): list_s.remove(index_element) list_s.remove(element) print(list_s) else: list_s.append("s") list_s.remove("s") else: list_s.append("s") list_s.remove("s") print(list_s)
s187621424
p04029
u048238198
1599473013
Python
Python (3.8.2)
py
Runtime Error
23
8984
96
N = ini() print(int((N*(N+1))/2)) ''' sum = 0 for i in range(N): sum += (i+1) print(sum) '''
s145192019
p04029
u609752511
1599404911
Python
Python (3.8.2)
py
Runtime Error
28
8788
49
k=0 for i in range(N+1): k +=i print(k)
s524872246
p04029
u802796197
1598647300
Python
Python (3.8.2)
py
Runtime Error
19
8940
482
AキャンディーとNにんの子供イージー # 競プロ幼稚園にはN人の子供がいます。えび先生は、子供たちを一列に並べ、一人目にはキャンディーを1個、二人目には2個,...,N人めにはN個あげることにしました。 # 必要なキャンディーの個数の合計は何個でしょう? # 1 <= N <= 100 # Nは子供の人数 N = int(input()) # print(N) # answerは合計個数 answer = (N * (N + 1) // 2) print(answer)
s284853103
p04029
u947123009
1598586225
Python
Python (3.8.2)
py
Runtime Error
23
8968
102
x = N if x % 2 == 1: print((N + 1)*(N // 2)+(N + 1) / 2) if x % 2 == 0: print((N + 1) * N / 2)
s957239434
p04029
u268314634
1598501616
Python
Python (3.8.2)
py
Runtime Error
21
8868
121
#他人のコピー n=input() n = int(input()) candy = (1 / 2) * n * (n + 1) print(int(candy)) #他人のコピー
s599855302
p04029
u496280557
1598470851
Python
Python (3.8.2)
py
Runtime Error
25
9084
41
N = int(input()) Print (N * (N + 1) // 2)
s481326681
p04029
u846155148
1598421753
Python
Python (3.8.2)
py
Runtime Error
25
9016
37
candy = N * N /2 + N /2 print(candy)
s736785073
p04029
u846155148
1598421471
Python
Python (3.8.2)
py
Runtime Error
21
8900
28
c = N * (N + 1 )/2 print(c)
s325449265
p04029
u846155148
1598421212
Python
Python (3.8.2)
py
Runtime Error
23
9016
36
candy = N * (N + 1 )/2 print(candy)
s822300029
p04029
u808569469
1598307301
Python
Python (3.8.2)
py
Runtime Error
23
9012
32
ame = N * (N + 1) / 2 print(ame)
s080018525
p04029
u546132222
1598295739
Python
Python (3.8.2)
py
Runtime Error
21
9008
157
# 043A # N人の時のキャンディーの合計数 # 入力値 子供の人数 # 入力 = int(input()) # 処理 answer = (n + 1) * n / 2 print(answer)
s790687625
p04029
u925353288
1598227439
Python
Python (3.8.2)
py
Runtime Error
20
8944
302
# 等差数列 N = int(input()) # 1+2+3+4+...+(N-2)+(N-1)+N # N+(N-1)+(N-2)+...+4+3+2+1 # 上と下を足し算して、2で割る a = N+1 b = N # print( a * b / 2 ) # TypeError: can only concatenate str (not "int") # Nという文字と数字を連結できない?? print(math.floor(a * b / 2 )
s281970218
p04029
u252160635
1597807011
Python
Python (3.8.2)
py
Runtime Error
25
8808
200
#include <bits/stdc++.h> using namespace std; int main() { int N, sum = 0; cin >> N; for (int i = 1; i < N + 1; i++) { sum += i; } cout << sum << endl; return 0; }
s254822796
p04029
u779830746
1597803693
Python
Python (3.8.2)
py
Runtime Error
26
9092
120
# 1人目は1個 a = 1 # 入力 b, c = map(int, input().split()) # 処理 answer = a + b + c # 出力 print(answer)
s577398294
p04029
u779830746
1597803658
Python
Python (3.8.2)
py
Runtime Error
24
9088
120
# 1人目は1個 a = 1 # 入力 b, c = map(int, input().split()) # 処理 answer = a + b + c # 出力 print(answer)
s282635466
p04029
u265118937
1597730393
Python
Python (3.8.2)
py
Runtime Error
21
9012
64
n=int(input() ans=0 for i in range(1,n+1): ans+=i print(ans)
s635159872
p04029
u814265211
1597626059
Python
Python (3.8.2)
py
Runtime Error
24
8792
71
N = int(input()) ans = 0 for i in range(1, N+1) ans += i print(ans)
s375606271
p04029
u552738814
1596760966
Python
Python (3.8.2)
py
Runtime Error
24
8816
77
n = int(input() total = 0 for i in range(n+1): total += i print(total)
s486501414
p04029
u552738814
1596760731
Python
Python (3.8.2)
py
Runtime Error
22
8968
90
n = map(int,input().split()) total = 0 for i in range(n+1): total += i print(total)
s624671450
p04029
u552738814
1596760610
Python
Python (3.8.2)
py
Runtime Error
19
8844
90
n = map(int,input().split()) total = 0 for i in range(n+1): total += i print(total)
s234210965
p04029
u125269142
1596507822
Python
Python (3.8.2)
py
Runtime Error
22
9148
43
n = int(input()) ans = n(1+n)/2 print(ans)
s137303428
p04029
u123107676
1596389703
Python
Python (3.8.2)
py
Runtime Error
21
9036
42
print(sum(list(range(1, int(input()+1)))))
s309907247
p04029
u671454079
1596389216
Python
Python (3.8.2)
py
Runtime Error
23
8976
71
N = input() sum = 0 for i in range(N): sum += i**2 print(sum)
s190845153
p04029
u372303722
1596384869
Python
Python (3.8.2)
py
Runtime Error
25
9072
322
N = int(input()) list = [int(a) for a in input().split()] A = sum(list)//N ans = 0 for k in range(N): ans = ans + (list[j] - A) ** 2 for i in range(-100,100): sum = 0 sum_new = 0 for j in range(N): sum_new = sum_new + (list[j] - i) ** 2 if(sum > sum_new): ans = sum_new print(ans)
s697116511
p04029
u105099610
1596149048
Python
Python (3.8.2)
py
Runtime Error
21
8968
29
for i in N: x += 1 print(x)
s157988179
p04029
u083184913
1595944905
Python
Python (3.8.2)
py
Runtime Error
20
8912
40
val1=int(input()) print(val1*(val1+1)/)
s929010074
p04029
u790653524
1595821768
Python
Python (3.8.2)
py
Runtime Error
19
9084
61
n = int(input()) while n > 0: a += n n -= 1 print(a)
s816273227
p04029
u790653524
1595821575
Python
Python (3.8.2)
py
Runtime Error
21
9080
80
n = map(int, input().split()) a = 0 while n > 0: a += n n -= 1 print(a)
s073548759
p04029
u790653524
1595821432
Python
Python (3.8.2)
py
Runtime Error
23
8852
73
n = map(int, input().split()) while n > 0: a += n n -= 1 print(a)
s421819775
p04029
u790653524
1595821385
Python
Python (3.8.2)
py
Runtime Error
29
8956
79
n = map(int, input().split()) a = 0 while n > 0: a += n n -= 1 print(a)
s112841484
p04029
u790653524
1595821313
Python
Python (3.8.2)
py
Runtime Error
22
9092
79
n = map(int, input().split()) a = 0 while n < 0: a += n n -= 1 print(a)
s960099597
p04029
u790653524
1595821224
Python
Python (3.8.2)
py
Runtime Error
23
8940
75
n = map(int, input().split()) while n < 0: a += n n -= 1 print(a)
s079025248
p04029
u790653524
1595820785
Python
Python (3.8.2)
py
Runtime Error
25
9056
76
n = map(int, input().split()) while n == 0: a += n n -= 1 print(a)
s343373394
p04029
u045793300
1595685117
Python
Python (3.8.2)
py
Runtime Error
27
9148
83
n = int(input()) num = 0 for num in range(n+1): total = total + num print(total)
s383845820
p04029
u045793300
1595685071
Python
Python (3.8.2)
py
Runtime Error
25
9064
75
n = int(input()) for num in range(n+1): total = total + num print(total)
s205603251
p04029
u045793300
1595685030
Python
Python (3.8.2)
py
Runtime Error
22
8944
69
n = input() for num in range(n+1): total = total + num print(total)
s996022935
p04029
u045793300
1595685011
Python
Python (3.8.2)
py
Runtime Error
23
9024
82
n = int(input().split()) for num in range(n+1): total = total + num print(total)
s053418562
p04029
u861421280
1595490761
Python
Python (3.8.2)
py
Runtime Error
26
8912
104
n=int(input("enter candy=")) c="" for i in range(n): if c==1: n=+1 total=n*c print(total)
s482333135
p04029
u185806788
1594974249
Python
Python (3.8.2)
py
Runtime Error
22
9084
27
a=input() print(a*(a+1)//2)
s053047532
p04029
u551857719
1594756136
Python
Python (3.8.2)
py
Runtime Error
24
8944
535
#!/usr/bin/python # -*- coding: UTF-8 -*- import sys def get_ints(): return map(int, sys.stdin.readline().strip().split()) def _main(): input() an = list(get_ints()) t = 0 old = 1000000000 while 1: ans = sq(t, an) g = sq(t+1, an) - ans t -= g / abs(g) if old > ans: old = ans else: break print(int(old)) def sq(t, an): ans = 0 for ai in an: ans += pow(ai - t, 2) return ans if __name__ == "__main__": _main()
s867233127
p04029
u113255362
1594612138
Python
Python (3.8.2)
py
Runtime Error
31
8988
47
N = int(input()) res = int(N(N+1)/2) print(res)
s645019945
p04029
u316603606
1594407402
Python
Python (3.8.2)
py
Runtime Error
19
9124
37
N = int (input ()) print (N*(N+1))/2
s875581655
p04029
u233932118
1594352902
Python
Python (3.8.2)
py
Runtime Error
27
9128
76
N = int(input()) ans = 1 for i in range(1,N+1): ans += ans+i print(answer)
s675855535
p04029
u215376033
1594061169
Python
Python (3.8.2)
py
Runtime Error
20
8832
117
number = input() answer = 0 for i in range(number): number = number+1 answer = answer + number print(answer)
s099657961
p04029
u215376033
1594061069
Python
Python (3.8.2)
py
Runtime Error
22
8844
106
number = input() for i in range(number): number = number+1 answer = answer + number print(answer)
s999105828
p04029
u215376033
1594060902
Python
Python (3.8.2)
py
Runtime Error
22
9064
76
number = input() for i in range(number): number = number+1 print(number)
s535088438
p04029
u373181095
1593716669
Python
Python (3.8.2)
py
Runtime Error
26
8884
63
x=int(input(child:)) y=0 for i in range(0,x+1): y+=i print(x)
s032556258
p04029
u001999168
1593716187
Python
Python (3.8.2)
py
Runtime Error
23
8984
71
N=int(input()) total=0 for i in range(1,n+1): total += i print(total)
s066567141
p04029
u761062383
1593556110
Python
Python (3.8.2)
py
Runtime Error
23
8920
61
n = input() ans=0 for i in range(1, n+1): ans+=i print(ans)
s319319778
p04029
u169138653
1593224414
Python
Python (3.8.2)
py
Runtime Error
23
9120
178
n=int(input()) a=list(map(int,input().split())) ans=10**18 for num in range(-100,101): cnt=0 for i in range(n): cnt+=(num-a[i])**2 ans=min(ans,cnt) print(ans)
s328270822
p04029
u697615293
1593096721
Python
Python (3.8.2)
py
Runtime Error
25
8984
190
a = list(input()) b = [] for i in a: if a.count(i) >= len(a)/2: b = [j for j ,x in enumerate(a) if x == i] else: pass if not b: print(-1,1) else: print(b[0],b[1])
s817396442
p04029
u124063060
1592960687
Python
Python (3.8.2)
py
Runtime Error
22
8944
73
N = int(input()) ans = 0 for(i = 1; i <= N; i++): ans +=1 print(i)
s567629124
p04029
u333591669
1592797268
Python
Python (3.8.2)
py
Runtime Error
30
8840
112
def candy(): n=int(input()) a=0 for i in range (0,n) a=a+1 print(a) candy(10)
s475058322
p04029
u081149041
1592444931
Python
Python (3.4.3)
py
Runtime Error
17
2940
78
def candies(): n = int(input()) print((n * (n + 1)) / 2) candies()
s525585893
p04029
u081149041
1592444901
Python
Python (3.4.3)
py
Runtime Error
18
3060
88
def candies(): n = int(input()) a = (n * (n + 1)) / 2 print(a) candies()
s283176452
p04029
u081149041
1592444854
Python
Python (3.4.3)
py
Runtime Error
17
2940
88
def candies(): n = int(input()) a = (n * (n + 1)) / 2 print(a) candies()
s202095894
p04029
u081149041
1592444814
Python
Python (3.4.3)
py
Runtime Error
17
2940
86
def candies(): n = int(input()) a = n * (n + 1) / 2 print(a) candies()
s997318134
p04029
u081149041
1592444762
Python
Python (3.4.3)
py
Runtime Error
17
2940
71
def candies(): n = int(input()) a = n * (n + 1) / 2 print(a)
s006461299
p04029
u100927237
1591966433
Python
Python (3.4.3)
py
Runtime Error
17
2940
99
n = int(input()) k = int(input()) x = int(input()) y = int(input()) print(x*n-max((x-y)*(n-k),0))
s863171263
p04029
u100927237
1591965480
Python
Python (3.4.3)
py
Runtime Error
17
2940
61
n = int(input()) for i in range(1,n+1): ans += i print(ans)
s804174920
p04029
u100927237
1591965108
Python
Python (3.4.3)
py
Runtime Error
17
2940
34
n = int(input()) print((n*(n+1)/2)
s509057817
p04029
u500376440
1591896142
Python
Python (3.4.3)
py
Runtime Error
17
2940
40
N=int(input()) print(math.factorial(N))
s353215743
p04029
u078349616
1591847298
Python
Python (3.4.3)
py
Runtime Error
17
2940
46
print(sum[i for i in range(1, int(input())+1)]
s064719433
p04029
u078349616
1591847264
Python
Python (3.4.3)
py
Runtime Error
17
2940
44
print(sum[for i in range(1, int(input())+1)]
s208945891
p04029
u600261652
1590893643
Python
Python (3.4.3)
py
Runtime Error
17
2940
88
N = int(input()) list = [] for i in range(N): list.attend(N) N -= 1 print(sum(list))
s421432311
p04029
u893239355
1590838289
Python
Python (3.4.3)
py
Runtime Error
17
2940
351
#include<bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define FOR(i, a, b) for (int i= (a); i < (b); ++i) typedef long long ll; typedef pair<int,int> P; const int INF = 100100100; const int MOD = (int)1e9 + 7; const double EPS = 1e-9; int main() { int N; cin >> N; cout << 0.5 * (N) * (N + 1) << endl; }
s929490450
p04029
u435721973
1590815454
Python
Python (3.4.3)
py
Runtime Error
17
2940
64
a = int(input()) for i in range(a + 1): sum += i print(sum)
s328496599
p04029
u763396655
1590252482
Python
Python (3.4.3)
py
Runtime Error
23
3572
109
from functools import reduce from operator import mul n = int(input()) print(reduce(mul, map(range(1,n+1))))
s843293046
p04029
u888100977
1589887968
Python
Python (3.4.3)
py
Runtime Error
17
2940
32
n = int(input()) print(n(n-1)/2)
s845901259
p04029
u278855471
1589292322
Python
PyPy3 (2.4.0)
py
Runtime Error
172
38512
61
N = int(input()) result = N * (N + 1) // 2 print(f'{result}')
s965393674
p04029
u038956510
1589024100
Python
Python (3.4.3)
py
Runtime Error
17
2940
81
n = input() total = 0 for candy in range(1, n+1): total += candy print(candy)
s011566641
p04029
u230621983
1588881077
Python
Python (3.4.3)
py
Runtime Error
17
2940
202
function Main(input) { const n = parseInt(input); var ans = 0 for (var i = 1; i <= n ; i++) { ans += i } console.log(ans); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));
s694364618
p04029
u441320782
1588731013
Python
Python (3.4.3)
py
Runtime Error
16
2940
43
x=[i for i in range(1,input()+1)] print(x)
s729605372
p04029
u441320782
1588730956
Python
Python (3.4.3)
py
Runtime Error
17
2940
43
x=[i for i in range(input())] print(sum(x))
s460960371
p04029
u730150255
1588699583
Python
Python (3.4.3)
py
Runtime Error
17
2940
37
n = int(input()) print(int(n*(n+1)/2)
s322877821
p04029
u943057856
1588360947
Python
Python (3.4.3)
py
Runtime Error
17
2940
75
n,k,x,y=[int(input()) for _ in range(4)] print(k*x+(n-k)*y if n>k else n*x)
s046814029
p04029
u417959834
1588355533
Python
Python (3.4.3)
py
Runtime Error
17
2940
116
#! python3 def main(): N = input() ans = 0 for i in range(1,N+1): ans += i print(ans) main()
s971052712
p04029
u586206420
1588302964
Python
Python (3.4.3)
py
Runtime Error
17
2940
66
import ita s=int(input()) n=0 while(s>0): n=n+s s=s-1 print(n)
s015373469
p04029
u586206420
1588302447
Python
Python (3.4.3)
py
Runtime Error
17
2940
63
s=print(int(input())) n=0 while(s>0): n=n+1 s=s-1 return(n)
s534042969
p04029
u586206420
1588302288
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
s = print(int(input())) n = 0 for i in range(0, s): n = n + 1 return(n)
s629463107
p04029
u586206420
1588302066
Python
Python (3.4.3)
py
Runtime Error
17
2940
73
s = print(int(input())) n = 0 for i in range(1, s): n = n + 1 return(n)
s738263962
p04029
u431068320
1588260924
Python
Python (3.4.3)
py
Runtime Error
17
2940
259
if __name__ == '__main__': n = int(input()) lst = list(map(int, input().split())) ans = (50*101)*(50*101) for i in range(-100,101): mn = 0 for c in lst: mn += (i-c)*(i-c) ans = min(ans,mn) print(ans)
s486449451
p04029
u578323547
1588188454
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38512
33
n = int(input()) print (n+1)*n/2
s958882367
p04029
u239653493
1588123692
Python
Python (3.4.3)
py
Runtime Error
17
2940
28
n=input() print(n*(n+1)//2)
s491530182
p04029
u103178403
1588101046
Python
Python (3.4.3)
py
Runtime Error
17
2940
52
print(sum([int(i)for i in range(1,int(input()+1))]))
s483796450
p04029
u691446391
1588062322
Python
Python (3.4.3)
py
Runtime Error
17
3060
178
import math n = int(input()) arr = list(map(int,input().split())) add = sum(arr) x = math.ceil(add/n) ans = 0 for i in range(len(arr)): ans += ((x-arr[i])*(x-arr[i])) print(ans)
s290821818
p04029
u199459731
1588052257
Python
Python (3.4.3)
py
Runtime Error
17
3060
238
stay = int(input()) change_day = int(input()) first_cost = int(input()) change_cost = int(input()) total_cost = 0 for i in range(stay): if(i < change_day): total_cost += first_cost else: total_cost += change_cost print(total_cost)
s576335777
p04029
u024782094
1587765869
Python
Python (3.4.3)
py
Runtime Error
17
2940
32
n=int(imput()) print(n*(n+1)//2)
s361625822
p04029
u235066013
1587612250
Python
Python (3.4.3)
py
Runtime Error
17
2940
15
return N(N+1)/2
s931991640
p04029
u507116804
1587419371
Python
Python (3.4.3)
py
Runtime Error
18
2940
39
a = input(int()) print(int(a*(a+1)/2))
s412799608
p04029
u507116804
1587419125
Python
Python (3.4.3)
py
Runtime Error
17
2940
34
a = input(int()) print(a*(a+1)/2)
s813721987
p04029
u559200744
1587183367
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38512
54
N = int(input()) print(sum([i for i in range(1, N+1)])
s700263911
p04029
u566321790
1586979698
Python
Python (3.4.3)
py
Runtime Error
18
2940
63
n = input() x = 0 for i in range(n): x += (i+1) print(x)
s304217852
p04029
u217303170
1586827573
Python
Python (3.4.3)
py
Runtime Error
17
2940
58
s = int(input()) for x in range(0,51): s += x print s
s778636097
p04029
u217303170
1586827482
Python
Python (3.4.3)
py
Runtime Error
17
2940
57
s = int(input()) for x in range(1,51): s += x print s
s609981649
p04029
u197029318
1586824419
Python
Python (3.4.3)
py
Runtime Error
16
2940
186
n,k,x,y = map(lnt(input().split()) int ans int kouhan == n - k if( n > k): ans == (k * x) * (kouhan*y) else: ans == n * x; print(ans)
s107582140
p04029
u381712637
1586752882
Python
Python (3.4.3)
py
Runtime Error
17
2940
85
n = int (input()) resilt =0 for i in range(1,n): result =result +i print (result)
s298460705
p04029
u381712637
1586752786
Python
Python (3.4.3)
py
Runtime Error
17
2940
81
n = int (input()) resilt =0 for i in range(1,n): result =result +i print result
s012625226
p04029
u381712637
1586752715
Python
Python (3.4.3)
py
Runtime Error
17
2940
72
n = int (input()) for i in range(1,n): result =result + i print result