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
s169796672
p02412
u130834228
1489044829
Python
Python3
py
Runtime Error
0
0
259
while(1): n, x = map(int, input().split()) t = 0 if n == x == 0: break for i in range(1, n+1): for j in range(i+1, n+1): for k in range(k+1, n+1): if i+j+k == x: if i != j and j != k and k != i: t += 1 #print(i, j, k) print(t)
s914439100
p02412
u042885182
1493486383
Python
Python
py
Runtime Error
0
0
1351
# coding: utf-8 # Here your code ! def func(): data=[] while(True): try: line=[ int(item) for item in input().rstrip().split(" ") ] if(line == [0,0]): break data.append(line) except EOFError: break except: retur...
s232479028
p02412
u821624310
1496211925
Python
Python3
py
Runtime Error
580
9288
589
while 1: n, x = map(int, input().split()) if n == 0 and x == 0: break a =[] for i in range(1, n + 1): for j in range(2, n + 1): for k in range(3, n + 1): if i + j + k == x: if i != j: if j != k: ...
s169111905
p02412
u821624310
1496212023
Python
Python3
py
Runtime Error
590
9216
594
while 1: n, x = map(int, input().split()) if n == 0 and x == 0: break a =[] for i in range(1, n + 1): for j in range(2, n + 1): for k in range(3, n + 1): if i + j + k == x: if i != j: if j != k: ...
s399663049
p02412
u193453446
1499331058
Python
Python3
py
Runtime Error
0
0
473
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ??´????????? """ while True: inp = input().strip().split(" ") n = int(inp[0]) + 1 x = int(inp[1]) cnt = 0 if n < 1 and x < 1: break for i in range(1, n-2): for j in range(i + 1, n-1): for k in range(j + 1, n): ...
s955705313
p02412
u999594662
1499428054
Python
Python3
py
Runtime Error
0
0
209
while True: n, x = map(int, raw_input().split()) if n == 0 and x == 0: break a = 0 for i in range(1, n+1): for j in range(i + 1, n + 1): b = x - (i + j) if b > j and b <= n: a += 1 print(a)
s379574664
p02412
u999594662
1499428373
Python
Python3
py
Runtime Error
0
0
211
while True: n, x = map(int, raw_input().split()) if n == 0 and x == 0: break a = 0 for i in range(1, n + 1): for j in range(i + 1, n + 1): b = x - (i + j) if b > j and b <= n: a += 1 print(a)
s750244014
p02412
u999594662
1499429875
Python
Python3
py
Runtime Error
0
0
264
while True: n, x = map(int, raw_input().split()) if n == 0 and x == 0: break a = 0 for i in range(1, n): for j in range(i + 1, n): b = x - (i + j) if b > j and b <= n: a += 1 print(a)
s960630179
p02412
u096862087
1503714887
Python
Python3
py
Runtime Error
0
0
286
def counter(n, x): count = 0 for i in range(n-2): for j in range(1, n-1): for k in range(2, n): if i + j + k == x: count += 1 return count while True: n, x = map(int, input().split()) print(counter(n, x))
s590194376
p02412
u597198969
1503721429
Python
Python3
py
Runtime Error
0
0
293
while(True): n,x = [int(i) for i in input().split()] if(n == 0 and x == 0): break t = 0 for i in range(1,n + 1): for j in range(1,n + 1): for k range(1,n + 1): if(i < j < k and i + j + k == x): t += 1 print(t)
s208855748
p02412
u664228906
1506489058
Python
Python3
py
Runtime Error
0
0
211
N,M = map(int, input().split()) ans = 0 while not (n == 0 and m == 0): for i in range(N): for j in range(N): for k in range(N): if ( i==j or i==k or j==k): elif(i + j + k == M): ans += 1 print(ans)
s972242587
p02412
u664228906
1506489084
Python
Python3
py
Runtime Error
0
0
211
N,M = map(int, input().split()) ans = 0 while not (N == 0 and M == 0): for i in range(N): for j in range(N): for k in range(N): if ( i==j or i==k or j==k): elif(i + j + k == M): ans += 1 print(ans)
s061000228
p02412
u664228906
1506489177
Python
Python3
py
Runtime Error
0
0
212
N,M = map(int, input().split()) ans = 0 while not (N == 0 and M == 0): for i in range(N): for j in range(N): for k in range(N): if ( i==j or i==k or j==k): elif (i + j + k == M): ans += 1 print(ans)
s156895155
p02412
u015553205
1507392180
Python
Python3
py
Runtime Error
0
0
541
Answer = [] flg = 1 def Taxed(p,q): T = int(p*(1+q/100)) return T while flg > 0: inp = input().split() x = int(inp[0]) y = int(inp[1]) s = int(inp[2]) flg = x**2+y**2+s**2 if flg == 0: break M = 0 for i in range(1,s-1): for j in range(1,s-1): a = T...
s955585403
p02412
u626266743
1508853179
Python
Python3
py
Runtime Error
0
0
251
n, x = map(int, input().split()) if (n == x == 0) : break count = 0 for a in range (1, n) : for b in range (2, n) : for c in range (3, n) : Sum = a + b + c if (Sum == x) : count += 1 print(count)
s158178001
p02412
u626266743
1508853349
Python
Python3
py
Runtime Error
0
0
317
while (n == x != 0) : n, x = map(int, input().split()) if (n == x == 0) : break count = 0 for a in range (1, n) : for b in range (2, n) : for c in range (3, n) : Sum = a + b + c if (Sum == x) : count += 1 print(count)
s578129580
p02412
u626266743
1508895181
Python
Python3
py
Runtime Error
0
0
304
while True: n, x = map(int, input().split()) if (n == x == 0): break count = 0 for a in range(1, n): for b in range(a + 1, n): for c in range(b + 1, n): Sum = a + b + c if (Sum == x): count += 1 print(count)
s103596763
p02412
u626266743
1508895252
Python
Python3
py
Runtime Error
0
0
308
while True: n, x = map(int, input().split()) if (n == x == 0): break count = 0 for a in range(1, n): for b in range((a + 1), n): for c in range((b + 1), n): Sum = a + b + c if (Sum == x): count += 1 print(count)
s560427621
p02412
u626266743
1508895358
Python
Python3
py
Runtime Error
0
0
311
while True: n, x = map(int, input().split()) if (n == x == 0): break count = 0 for a in range(1, n): for b in range(a + 1, n): for c in range(b + 1, n): Sum = a + b + c if (Sum == x): count = count + 1 print(count)
s794860936
p02412
u424457654
1508895614
Python
Python3
py
Runtime Error
0
0
228
while True: n, x = map(int(input().split())) if n == x == 0: break count = 0 for a in range(1, n): for b in range(a + 1, n): for c in range(b + 1, n): Sum = a + b + c if Sum == x: count += 1 print(count)
s616080226
p02412
u626266743
1508895649
Python
Python3
py
Runtime Error
0
0
342
while True: n, x = map(int, input().split()) if (n == x == 0): break else: count = 0 for a in range(1, n): for b in range(a + 1, n): for c in range(b + 1, n): Sum = a + b + c if (Sum == x): count ...
s052447029
p02412
u424457654
1508895787
Python
Python3
py
Runtime Error
0
0
244
while True: n, x = map(int(input().split())) if n == x == 0: break Sum = 0 count = 0 for a in range(1, n): for b in range(a + 1, n): for c in range(b + 1, n): Sum = a + b + c if Sum == x: count = count + 1 print(count)
s911607863
p02412
u424457654
1508895857
Python
Python3
py
Runtime Error
0
0
236
while True: n, x = map(int(input().split())) if n == x == 0: break Sum = 0 count = 0 for a in range(1, n): for b in range(1, n): for c in range(1, n): Sum = a + b + c if Sum == x: count = count + 1 print(count)
s249679605
p02412
u626266743
1508896034
Python
Python3
py
Runtime Error
0
0
315
while True: n, x = map(int, input().split()) if (n == x == 0): break count = 0 for a in range(1, x // 3): for b in range(a + 1, x // 2): for c in range(b + 1, n): Sum = a + b + c if (Sum == x): count += 1 print(count)
s086793276
p02412
u626266743
1508896125
Python
Python3
py
Runtime Error
0
0
318
while True: n, x = map(int, input().split()) if (n == x == 0): break count = 0 for a in range(1, x // 3): for b in range(a + 1, x // 2): for c in range(b + 1, n + 1) Sum = a + b + c if (Sum == x): count += 1 print(count)
s740473796
p02412
u626266743
1508896148
Python
Python3
py
Runtime Error
0
0
316
while True: n, x = map(int, input().split()) if (n == x == 0): break count = 0 for a in range(1, n + 1): for b in range(a + 1, n + 1): for c in range(b + 1, n + 1) Sum = a + b + c if (Sum == x): count += 1 print(count)
s688854196
p02412
u626266743
1508896172
Python
Python3
py
Runtime Error
0
0
319
while True: n, x = map(int, input().split()) if (n == x == 0): break count = 0 for a in range(1, x // 3): for b in range(a + 1, x // 2): for c in range(b + 1, n + 1): Sum = a + b + c if (Sum == x): count += 1 print(count)
s352525893
p02412
u626266743
1508896187
Python
Python3
py
Runtime Error
0
0
317
while True: n, x = map(int, input().split()) if (n == x == 0): break count = 0 for a in range(1, n + 1): for b in range(a + 1, n + 1): for c in range(b + 1, n + 1): Sum = a + b + c if (Sum == x): count += 1 print(count)
s273584795
p02412
u776758454
1510177517
Python
Python3
py
Runtime Error
0
0
352
import itertools def main(): data = [] while True: n, x = map(int, input().split()) if [n, x] == [0, 0]: break data.append([n, x]) for [n, x] in data: _set = set(range(1, n+1)) comb = set(itertools.combinations(_list, 3)) print(sum((True if sum(i) == x else...
s999437484
p02412
u869667855
1510835673
Python
Python
py
Runtime Error
0
0
123
for i in range(1,n-1): for j in range(i+1,n): for k in range(j+1,n+1): if i+j+k==x:ans+=1 print ans
s028868969
p02412
u869667855
1510835930
Python
Python
py
Runtime Error
0
0
515
import Control.Monad import Control.Applicative combinations :: Int -> [a] -> [[a]] combinations 0 _ = [[]] combinations _ [] = [] combinations n (x:xs) = (map (x:) (combinations (n-1) xs)) ++ (combinations n xs) solve :: [Int] -> String solve [n, x] = show $ length [nc3 | nc3<-combinations 3 [1..n], sum nc3==x] ...
s367829600
p02412
u869667855
1510835943
Python
Python3
py
Runtime Error
0
0
515
import Control.Monad import Control.Applicative combinations :: Int -> [a] -> [[a]] combinations 0 _ = [[]] combinations _ [] = [] combinations n (x:xs) = (map (x:) (combinations (n-1) xs)) ++ (combinations n xs) solve :: [Int] -> String solve [n, x] = show $ length [nc3 | nc3<-combinations 3 [1..n], sum nc3==x] ...
s335697211
p02412
u488038316
1511325815
Python
Python3
py
Runtime Error
0
0
417
# -*-coding:utf-8 def main(): while True: n, x = map(int, input().split()) if ((n == 0) and (x == 0)): break count = 0 for i in range(1, n+1): for j in range(1, n+1): for k in range(1, n+1): if((i<j) and (j<k) and i+j+k =...
s326891213
p02412
u488038316
1511325931
Python
Python
py
Runtime Error
0
0
417
# -*-coding:utf-8 def main(): while True: n, x = map(int, input().split()) if ((n == 0) and (x == 0)): break count = 0 for i in range(1, n+1): for j in range(1, n+1): for k in range(1, n+1): if((i<j) and (j<k) and i+j+k =...
s957721278
p02412
u150984829
1513176931
Python
Python3
py
Runtime Error
0
0
140
while 1: n,x=map(int,input().split()) if n+x==0:break for i in range(3,n+1): for j in range(2,x-i): if x-i-j<j<i: c+=1 print(c)
s156692266
p02412
u150984829
1513464045
Python
Python3
py
Runtime Error
0
0
127
while 1: n,x=map(int,input().split()) if n+x==0:break print(sum([1 for j in range(2,x-i)for i in range(3,n+1)if x-i-j<j<i]))
s402819799
p02412
u426534722
1515767794
Python
Python3
py
Runtime Error
0
0
197
from itertools import combinations while True: n, x = map(int, input().split()) if n == x == 0: break print(sum(a + b + c == x for a, b, c in combinations(range(1, n + 1), 3))
s821154624
p02412
u426534722
1515768020
Python
Python3
py
Runtime Error
0
0
203
from itertools import combinations while True: n, x = map(int, input().split()) if n == x == 0: break print(len(1 for a, b, c in combinations(range(1, n + 1), 3) if a + b + c == x))
s150305268
p02412
u770698847
1516675431
Python
Python
py
Runtime Error
0
0
306
while(1): count =0 inp = raw_input().split(" ") if inp == "0 0": break for i in range(1,int(inp[0])+1): for j in range(1,int(inp[0])+1): if i != j: sum = i + j if sum == int(inp[1]): count += 1 print count
s374508593
p02412
u549056918
1516694393
Python
Python3
py
Runtime Error
0
0
254
from itertools import combinations as comb def get_ans(): m, n = (int(x) for x in input().split()) if m==0 and n==0: quit() ans = 0 for nums in comb(list(range(1, min(m,n-3)))): if sum(nums) == n: ans += 1 print(ans) while True: get_ans()
s356699747
p02412
u549056918
1516696597
Python
Python3
py
Runtime Error
0
0
324
from itertools import combinations as comb def get_ans(m, n): ans = sum(1 for nums in comb(range(1, min(m+1,n-2)), 2) if n-sum(nums)>0 and n-sum(nums) not in nums)) return ans while True: m, n = (int(x) for x in input().split()) if m==0 and n==0: quit() ans = get_ans(m, n) print(a...
s019940505
p02412
u549056918
1516696626
Python
Python3
py
Runtime Error
0
0
326
from itertools import combinations as comb def get_ans(m, n): ans = sum(1 for nums in comb(range(1, min(m+1,n-2)), 2) if (n-sum(nums)>0 and n-sum(nums) not in nums))) return ans while True: m, n = (int(x) for x in input().split()) if m==0 and n==0: quit() ans = get_ans(m, n) print...
s163907498
p02412
u838006829
1516700408
Python
Python3
py
Runtime Error
0
0
371
import numpy as np def countCombinations(n, x, size=3): dp = np.zeros((x + 1, size + 1), dtype=int) dp[0][0] = 1 for i in range(1, n + 1): dp[i:, 1:] += dp[:-i, :-1] print(dp) return dp[-1, -1] while True: m, n = (int(x) for x in input().split()) if m==0 and n==0: quit(...
s333760782
p02412
u838006829
1516700493
Python
Python3
py
Runtime Error
0
0
371
import numpy as np def countCombinations(n, x, size=3): dp = np.zeros((x + 1, size + 1), dtype=int) dp[0][0] = 1 for i in range(1, n + 1): dp[i:, 1:] += dp[:-i, :-1] print(dp) return dp[-1, -1] while True: m, n = (int(x) for x in input().split()) if m==0 and n==0: quit(...
s180096700
p02412
u838006829
1516700985
Python
Python3
py
Runtime Error
0
0
451
import numpy as np def countCombinations(n, x, size=3): dp = [[0 for i in range(size + 1)] for j in range(x + 1)] dp[0][0] = 1 for i in range(1, n + 1): for j in range(x + 1 - i): for k in range(size + 1 - 1): dp[i+j][1+k] += dp[j][k] return dp[-1][-1] while True: ...
s095463744
p02412
u838006829
1516701488
Python
Python3
py
Runtime Error
0
0
358
def countCombinationsNumpy(n, x, size=3): dp = np.zeros((x + 1, size + 1), dtype=int) dp[0, 0] = 1 for i in range(1, n + 1): dp[i:, 1:] += dp[:-i, :-1] print(dp) return dp[-1, -1] while True: m, n = (int(x) for x in input().split()) if m==0 and n==0: quit() ans = c...
s547546314
p02412
u613534067
1520306986
Python
Python3
py
Runtime Error
0
0
319
while(True): n, x = map(int, input().spilt()) if n == 0 and x == 0: break else: cnt = 0 for i in range(1, n+1): for k in range(i+1, n+1): for l in range(k+1, n+1): if i + k + l == x: cnt += 1 print(cnt)
s128312882
p02412
u095590628
1523717777
Python
Python3
py
Runtime Error
0
0
866
def transnum(int: n): if n % 3 != 0: return n + 3 - n % 3 else: return n while True: x,n = tuple(int(i) for i in input().split()) r = 0 if x == n == 0: break amin = n // 3 + 1 amax = 2 * transnum(n) // 3 if amax > x: amax = x A = [j for j in range(am...
s123993061
p02412
u095590628
1523718008
Python
Python3
py
Runtime Error
0
0
872
def transnum(int: n): if n % 3 != 0: return n + 3 - n % 3 else: return n while True: x,n = tuple(int(i) for i in input().split()) r = 0 if x == n == 0: break amin = n // 3 + 1 amax = 2 * transnum(n) // 3 if amax > x: amax = x A = [j for j in range(...
s641972433
p02412
u303842929
1527261939
Python
Python3
py
Runtime Error
0
0
373
#include <iostream> #include <cstdlib> #include <vector> #include <algorithm> using namespace std; int main(){ int n = 1, x = 0, ans; while(!(n == 0 && x == 0)){ cin >> n >> x; ans = 0; for(int i = 1; i <= n; i++){ for(int j = i + 1; j <= n; j++){ for(int k = j + 1; k <= n; k++){ if(i + j + k == x) ...
s891576671
p02412
u986478725
1527335227
Python
Python3
py
Runtime Error
0
0
534
# AOJ ITP1_7_B def numinput(): a = input().split() for i in range(len(a)): a[i] = int(a[i]) return a def main(): while True: a = numinput() n = a[0]; x = a[1] if n == 0 and x == 0: break # 1からnまでの異なる3つの数の和がxになる数の組の個数。 count = 0 for i in range(1, ...
s769810351
p02412
u007066325
1527475150
Python
Python3
py
Runtime Error
0
0
250
while True: a,b = map(int, input().split()) ans = 0 for i in range(a): for j in range(a): for k in range(a): if i != j and j != k and k != i and (i+j+k) == b: ans +=1 print(ans)
s218358920
p02412
u007066325
1527475230
Python
Python3
py
Runtime Error
0
0
251
while True: a,b = map(int, input().split()) ans = 0 for i in range(a): for j in range(a): for k in range(a): if i != j and j != k and k != i and (i+j+k) == b: ans +=1 print(ans)
s589654664
p02412
u500257793
1529105984
Python
Python
py
Runtime Error
0
0
235
while True: p=0 n,x=map(int,input().split()) if n==0 and x==0: break for i+1 in range(n): for j+2 in range(n): if i==j: break for k+3 in range(n): if i==k or j==k: break g=i+j+k if x==p: p+=1
s202812608
p02412
u912237403
1371220188
Python
Python
py
Runtime Error
0
0
293
while True n,x = map(int, raw_input().split() if n == 0 and x == 0: break c = 0 for i in range(1, n/3 +1): for j in range(i+1, n/2 +1): ij = i + j for k in range(j+1, n+1): if ij+k == x: c += 1 print c
s690233665
p02412
u912237403
1371220215
Python
Python
py
Runtime Error
0
0
294
while True: n,x = map(int, raw_input().split() if n == 0 and x == 0: break c = 0 for i in range(1, n/3 +1): for j in range(i+1, n/2 +1): ij = i + j for k in range(j+1, n+1): if ij+k == x: c += 1 print c
s866875349
p02412
u633068244
1393326417
Python
Python
py
Runtime Error
0
0
275
while True: n, x = map(int, raw_input().split()) if n == 0 and x == 0: break count = 0 for i in range(1, n-2): for j in range(i, n-1): k in range(j, n): if i+j+k == n: count += 1 print count
s842370289
p02412
u633068244
1393326513
Python
Python
py
Runtime Error
0
0
275
while True: n, x = map(int, raw_input().split()) if n == 0 and x == 0: break count = 0 for i in range(1, n-2): for j in range(i, n-1): k in range(j, n): if i+j+k == x: count += 1 print count
s982374780
p02412
u814387366
1403161232
Python
Python
py
Runtime Error
0
0
215
while True: n,x=map(int,raw_input().split()) count=0 for i in range(1,n+1): for j in range(i+1,n+1): for k in range(j+1,n+1): print str(i)+" "+str(j)+" "+str(k) if i+j+k==x: count+=1 print count
s863473162
p02412
u814387366
1403161279
Python
Python
py
Runtime Error
0
0
238
while True: n,x=map(int,raw_input().split()) if n==0 && x==0:break count=0 for i in range(1,n+1): for j in range(i+1,n+1): for k in range(j+1,n+1): print str(i)+" "+str(j)+" "+str(k) if i+j+k==x: count+=1 print count
s169296522
p02413
u539753516
1531242687
Python
Python3
py
Runtime Error
0
0
122
r,c=map(int, input().split()) for i in range(c): a=list(map(int, input().split())) a.append(sum(a)) print(*a)
s090784327
p02413
u299231628
1531841698
Python
Python3
py
Runtime Error
0
0
262
r, c = [int(i) for i in input().split()] data = ([int(i) for i in input().split()] for j in range(r)) ans = [data[i] + [sum(data[i])] for i in range(r)] last_ans = ans + [[sum([ans[i][j] for i in range(r)]) for j in range(c+1)]] for i in last_ans: print(*i)
s775135301
p02413
u299231628
1531841715
Python
Python3
py
Runtime Error
0
0
263
r, c = [int(i) for i in input().split()] data = [[int(i) for i in input().split()] for j in range(r))] ans = [data[i] + [sum(data[i])] for i in range(r)] last_ans = ans + [[sum([ans[i][j] for i in range(r)]) for j in range(c+1)]] for i in last_ans: print(*i)
s404127998
p02413
u203222829
1532169844
Python
Python3
py
Runtime Error
20
5600
454
# coding: utf-8 row, col = map(int, input().split()) spreadsheet = [] for i in range(row): val = list(map(int, input().split())) val.append(sum(val)) spreadsheet.append(val) for r in spreadsheet: print(' '.join(map(str, r))) last_row = [] for j in range(len(spreadsheet[1])): col_sum = 0 for ...
s576877870
p02413
u429841998
1535273360
Python
Python3
py
Runtime Error
20
5600
433
r, c = map(int, input().split()) d = [0] * (c + 1) for i in range(r): d[i] = list(map(int, input().split())) d[i].append(0) for j in range(c): d[i][c] += d[i][j] d[r] = [0] * (c + 1) for i in range(c + 1): for j in range(r): d[r][i] += d[j][i] for i in range(r + 1): row = '' ...
s655561429
p02413
u281808376
1540470407
Python
Python3
py
Runtime Error
20
5600
398
r_c_str=input().split() r_c=list(map(lambda i :int(i),r_c_str)) r=r_c[0] c=r_c[1] s_str=[input() for i in range(r)] s_str=[i.split() for i in s_str] s=[] for i in s_str: s.append(list(map(lambda j :int(j),i))) for i in range(r): s[i].append(sum(s[i])) s.append([0,0,0,0,0,0]) for i in range(c): for j in rang...
s333014308
p02413
u281808376
1540470438
Python
Python3
py
Runtime Error
20
5600
398
r_c_str=input().split() r_c=list(map(lambda i :int(i),r_c_str)) r=r_c[0] c=r_c[1] s_str=[input() for i in range(r)] s_str=[i.split() for i in s_str] s=[] for i in s_str: s.append(list(map(lambda j :int(j),i))) for i in range(r): s[i].append(sum(s[i])) s.append([0,0,0,0,0,0]) for i in range(c): for j in rang...
s840308767
p02413
u281808376
1540470592
Python
Python3
py
Runtime Error
20
5600
399
r_c_str=input().split() r_c=list(map(lambda i :int(i),r_c_str)) r=r_c[0] c=r_c[1] s_str=[input() for i in range(r)] s_str=[i.split() for i in s_str] s=[] for i in s_str: s.append(list(map(lambda j :int(j),i))) for i in range(r): s[i].append(sum(s[i])) s.append([0,0,0,0,0,0]) for i in range(c): for j in rang...
s477346889
p02413
u281808376
1540470604
Python
Python3
py
Runtime Error
20
5608
398
r_c_str=input().split() r_c=list(map(lambda i :int(i),r_c_str)) r=r_c[0] c=r_c[1] s_str=[input() for i in range(r)] s_str=[i.split() for i in s_str] s=[] for i in s_str: s.append(list(map(lambda j :int(j),i))) for i in range(r): s[i].append(sum(s[i])) s.append([0,0,0,0,0,0]) for i in range(c): for j in rang...
s977198551
p02413
u281808376
1540470621
Python
Python3
py
Runtime Error
20
5600
398
r_c_str=input().split() r_c=list(map(lambda i :int(i),r_c_str)) r=r_c[0] c=r_c[1] s_str=[input() for i in range(r)] s_str=[i.split() for i in s_str] s=[] for i in s_str: s.append(list(map(lambda j :int(j),i))) for i in range(r): s[i].append(sum(s[i])) s.append([0,0,0,0,0,0]) for i in range(c): for j in rang...
s000347853
p02413
u281808376
1540470708
Python
Python3
py
Runtime Error
20
5604
428
r_c_str=input().split() r_c=list(map(lambda i :int(i),r_c_str)) r=r_c[0] c=r_c[1] s_str=[input() for i in range(r)] s_str=[i.split() for i in s_str] s=[] for i in s_str: s.append(list(map(lambda j :int(j),i))) for i in range(r): s[i].append(sum(s[i])) s.append([]) for i in range(c+1): s[-1].append(0) for i ...
s028571321
p02413
u971674904
1545376042
Python
Python3
py
Runtime Error
0
0
264
a = [[0 for i in range(100+1)]for j in range(100+1)] r, c = map(int, input().split()) for i in range(r): for j in range(c): a[r-1][c-1] += int(input()) t = 0 for i in range(r): for j in range(c): t += sum(j) a.append(t) print(a)
s730445828
p02413
u971674904
1545376042
Python
Python3
py
Runtime Error
0
0
264
a = [[0 for i in range(100+1)]for j in range(100+1)] r, c = map(int, input().split()) for i in range(r): for j in range(c): a[r-1][c-1] += int(input()) t = 0 for i in range(r): for j in range(c): t += sum(j) a.append(t) print(a)
s859874190
p02413
u971674904
1545376042
Python
Python3
py
Runtime Error
0
0
264
a = [[0 for i in range(100+1)]for j in range(100+1)] r, c = map(int, input().split()) for i in range(r): for j in range(c): a[r-1][c-1] += int(input()) t = 0 for i in range(r): for j in range(c): t += sum(j) a.append(t) print(a)
s773539434
p02413
u184749404
1545740699
Python
Python3
py
Runtime Error
0
0
305
r,c = map(int,input().split()) A = [list(map(int,input().split())) for i in range(c)] for i in range(c): for j in range(r): print(A[i][j],end=" ") print(sum(A[i])) for i in range(c): ans = 0 for j in range(r): ans += A[j][i] print(ans,end=" ") print(sum(map(sum,A)))
s299928137
p02413
u902639104
1551476678
Python
Python3
py
Runtime Error
0
0
315
r,c=map(int,input().split()) tbl=[[0]*c for i in range(r+1)] for i in range(r): tbl[i]=list(map(int,input().split())) for i in range(c): for j in renge(r): tbl[r][i] +=tbl[j][i] for i in rnage(r+1): m=0 for j in range(c): m += tbl[i][j] print(tbl[i][j],end=" ") print(m)
s422323742
p02413
u025362139
1555970796
Python
Python3
py
Runtime Error
0
0
400
#coding: UTF-8 r, c = map(int, input().split()) list = [[0 for i in range(r+1)] for j in range(c+1)] a = [input().split() for k in range(c)] for l in range(r): for m in range(c): list[l][c] += int(a[l][m]) list[r][m] += int(a[l][m]) list[l][m] = int(a[l][m]) for n in range(r): print(...
s692188787
p02413
u025362139
1555970796
Python
Python3
py
Runtime Error
0
0
400
#coding: UTF-8 r, c = map(int, input().split()) list = [[0 for i in range(r+1)] for j in range(c+1)] a = [input().split() for k in range(c)] for l in range(r): for m in range(c): list[l][c] += int(a[l][m]) list[r][m] += int(a[l][m]) list[l][m] = int(a[l][m]) for n in range(r): print(...
s519894198
p02413
u025362139
1556204136
Python
Python3
py
Runtime Error
0
0
453
#coding: UTF-8 import sys r, c = map(int, input().split()) list = [[0 for i in range(r+1)] for j in range(c+1)] a = [input().split() for k in range(c)] for l in range(r): for m in range(c): list[l][c] += int(a[l][m]) list[r][m] += int(a[l][m]) list[l][m] = int(a[l][m]) for n in range(r):...
s466414979
p02413
u340503368
1556295264
Python
Python3
py
Runtime Error
0
0
363
r,c = map(int, input().split()) for i in range(r):     a = list(map(int, input().split()))     sum = 0     for j in range(c):         sum += a[j]     a.append(sum)     for k in range(c+1):         print(a[k], end = "")         if k != c:             print(" ", end = "")     print()           
s152983580
p02413
u928633434
1556515522
Python
Python3
py
Runtime Error
0
0
376
r,c = (int(x) for x in input().split()) table = [] i = 0 while i < r table[0] = list(int(x) for x in input().split()) i += 1 # output R i,j = 0,0 while i < r sum = 0 while j < c if j != 0: print(' ') print(' ' + teble[i][j], end='') sum += table[i][j] j += 1 if j == c: print('...
s662583692
p02413
u928633434
1556515540
Python
Python3
py
Runtime Error
0
0
376
r,c = (int(x) for x in input().split()) table = [] i = 0 while i < r table[0] = list(int(x) for x in input().split()) i += 1 # output R i,j = 0,0 while i < r sum = 0 while j < c if j != 0: print(' ') print(' ' + teble[i][j], end='') sum += table[i][j] j += 1 if j == c: print('...
s373324762
p02413
u805716376
1556716985
Python
Python3
py
Runtime Error
0
0
219
n, m = map(int, input().split()) a = [] b = [] for i in range(n): a = [list(map(int, input().split()))] a[i] += [sum(a[i])] for i in range(m): b += [a[:][i]] a += [b] for i in range(n): print(*a[i])
s952481949
p02413
u610816226
1556878197
Python
Python3
py
Runtime Error
0
0
300
a, b = map(int, input().split()) al = [] b_lis = [] for _ in range(a): g = list(map(int, input().split())) g.append(sum(g)) al.append(g) for i in range(b+1): p = 0 for j in range(a): p += al[a][i] b_lis.append(p) for i in al: print(' '.join([str(v) for v in i]))
s043405493
p02413
u610816226
1556878327
Python
Python3
py
Runtime Error
0
0
316
a, b = map(int, input().split()) al = [] b_lis = [] for _ in range(a): g = list(map(int, input().split())) g.append(sum(g)) al.append(g) for i in range(b+1): p = 0 for j in range(a): p += al[j][i] b_lis.append(p) al += b_lis for i in al: print(' '.join([str(v) for v in i]))
s035914153
p02413
u610816226
1556878395
Python
Python3
py
Runtime Error
0
0
312
a, b = map(int, input().split()) al = [] b_lis = [] for _ in range(a): g = list(map(int, input().split())) g.append(sum(g)) al.append(g) for i in range(b+1): p = 0 for j in range(a): p += al[j][i] b_lis.append(p) al += b_lis for i in al: print(' '.join([str(v) for v in i]))
s840637161
p02413
u610816226
1556878431
Python
Python3
py
Runtime Error
0
0
320
a, b = map(int, input().split()) al = [] b_lis = [] for _ in range(a): g = list(map(int, input().split())) g.append(sum(g)) al.append(g) for i in range(b+1): p = 0 for j in range(a): p += al[j][i] b_lis.append(p) al_1 = al + b_lis for i in al_1: print(' '.join([str(v) for v in i]))
s376513653
p02413
u610816226
1556878726
Python
Python3
py
Runtime Error
0
0
323
a, b = map(int, input().split()) al = [] b_lis = [] for _ in range(a): g = list(map(int, input().split())) g.append(sum(g)) al.append(g) for i in range(b+1): p = 0 for j in range(a): p += al[j][i] b_lis.append(p) al_1.append((b_lis)) for i in al_1: print(' '.join([str(v) for v in i]...
s346993059
p02413
u480501638
1558934625
Python
Python3
py
Runtime Error
0
0
515
#include<iostream> using namespace std; int main(){ int r,c,t; t=0; cin>>r>>c; int R[c+1]={}; int S[c+1]={}; for (int i=0;i<r;i++){ for(int x=0;x<c;x++){ cin>>R[x]; cout<<R[x]<<" "; } for(int x=0;x<c;x++){ t+=R[x]; } cout<<t...
s436182185
p02413
u313600138
1558935188
Python
Python3
py
Runtime Error
0
0
120
n = int(input()) for i in range(1,n+1): if i%3==0 or i%10==3: print(" ",i,sep='',end="") else: pass print()
s852739297
p02413
u313600138
1558935252
Python
Python3
py
Runtime Error
0
0
103
n = int(input()) for i in range(1,n+1): if i%3==0 or i%10==3: print(" ",i,sep='',end="") print()
s145371334
p02413
u313600138
1558935278
Python
Python3
py
Runtime Error
0
0
103
n = int(input()) for i in range(1,n+1): if i%3==0 or i%10==3: print(" ",i,sep='',end="") print()
s466472455
p02413
u312033355
1558935460
Python
Python3
py
Runtime Error
0
0
335
i,j=map(int,input().split()) listA=[] for i in range(i): listA.append(list(map(int,input().split()))) listA[n].append(sum(listA[n])) listA.append([]) for n in range(j+1): number =0 for m in range(i): number+=listA[m][n] listA[i].append(number) for n in range(i+1): print(''.join(map(str,l...
s877593829
p02413
u629874472
1558969791
Python
Python3
py
Runtime Error
0
0
305
li = list(map(int,input().split())) mtx = [[] for _ in range(li[0])] li_sum = [] for i in range(li[0]): mtx[i] = list(map(int,input().split())) print(mtx[i],sum(mtx[i])) for j in range(li[j]): li_sum[j] += mtx[i][j] li_sum[j] += sum(mtx[i]) print(' '.join(map(str,li_sum)))
s836542236
p02413
u629874472
1558969871
Python
Python3
py
Runtime Error
0
0
320
li = list(map(int,input().split())) mtx = [[] for _ in range(li[0])] li_sum = [] for i in range(li[0]): mtx[i] = list(map(int,input().split())) print(mtx,end='') print(sum(mtx[i])) for j in range(li[j]): li_sum[j] += mtx[i][j] li_sum[j] += sum(mtx[i]) print(' '.join(map(str,li_sum)))
s151083621
p02413
u629874472
1558970015
Python
Python3
py
Runtime Error
0
0
342
li = list(map(int,input().split())) mtx = [[] for _ in range(li[0])] li_sum = [] for i in range(li[0]): a = input() mtx[i] = list(map(int,a.split())) print(mtx,end='') print(' ' ,sum(mtx[i]),sep='') for j in range(li[j]): li_sum[j] += mtx[i][j] li_sum[j] += sum(mtx[i]) print(' '.j...
s950970506
p02413
u629874472
1558970028
Python
Python3
py
Runtime Error
0
0
340
li = list(map(int,input().split())) mtx = [[] for _ in range(li[0])] li_sum = [] for i in range(li[0]): a = input() mtx[i] = list(map(int,a.split())) print(a,end='') print(' ' ,sum(mtx[i]),sep='') for j in range(li[j]): li_sum[j] += mtx[i][j] li_sum[j] += sum(mtx[i]) print(' '.joi...
s629062804
p02413
u629874472
1558970093
Python
Python3
py
Runtime Error
0
0
365
li = list(map(int,input().split())) mtx = [[] for _ in range(li[0])] li_sum = [0 for _ in range(li[1]+1)] for i in range(li[0]): a = input() mtx[i] = list(map(int,a.split())) print(a,end='') print(' ' ,sum(mtx[i]),sep='') for j in range(li[j]): li_sum[j] += mtx[i][j] li_sum[j] += s...
s645014004
p02413
u535719732
1559276879
Python
Python3
py
Runtime Error
0
0
87
import numpy as np r,c = map(int,input().split()) table = [[0]*c for i in range(r)]
s489275103
p02413
u313600138
1559543831
Python
Python3
py
Runtime Error
20
5592
236
r,c=map(int, input().split()) S=[] for num in range(c-1): A=list(map(int, input().split())) S.append(A) A.append(sum(A)) #print(list(zip(*S))) C=[] for t in (zip(*S)): C.append(sum(t)) S.append(C) for i in S: print(*i)