Skip to content

Instantly share code, notes, and snippets.

solve <- function(n) {
result <- largeSubtract(largeAdd(sumMultiple(n, 3), sumMultiple(n, 5)), sumMultiple(n, 15))
}
right <- function (string, char){
substr(string,nchar(string)-(char-1),nchar(string))
}
left <- function (string,char){
substr(string,1,char)
def sumMultiple(n, k):
n -= n % k
return (n + k) * int(n / k) >> 1
def solve(N):
result = sumMultiple(N, 3) + sumMultiple(N, 5) - sumMultiple(N, 15)
return result
T = int(input())
cache = {}
def calc(n, blank):
if blank < 0:
return 0;
if blank in cache:
return cache[blank];
value = 1
import numpy as np
def solve():
mat = [[np.inf] * 100 for _ in range(100)]
for i in range(100):
mat[i][i] = 0
n, m, k = [int(x) for x in input().split()]
s = [0] * (k+2)
import numpy as np
def solve():
mat = [[np.inf] * 100 for _ in range(100)]
for i in range(100):
mat[i][i] = 0
n, m, k = [int(x) for x in input().split()]
s = [0] * (k+2)
t = int(input())
x = [[0] * 100 for _ in range(200)]
def solve():
(n, r) = map(lambda x: int(x), input().split())
x = [0] * n
y = [0] * n
sol = [set() for _ in range(n*n)]
def solve():
(n, m) = map(lambda x: int(x), input().split())
now = [];
cost = 0
for i in range(n):
c = list(map(lambda x: int(x), input().split()))
c.sort()
count = 0
for x in c:
count += 1