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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s024020150 | p03606 | u922449550 | 1591002644 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 119 | N = int(input().split())
ans = 0
for i in range(N):
l, r = map(int, input().split())
ans += (r - l + 1)
print(ans) |
s611959257 | p03606 | u568711768 | 1588649429 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 140 | N = int(input())
M = list(map(int,input().split()))for _ in range(N)
sum = o
for i in range(N):
sum = sum + M[i][1]-M[i][0]+1
print(sum) |
s370856923 | p03606 | u702208001 | 1588630109 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 206 | n = int(input())
for _ in range(n):
print(sum(map(int, input().split())))n = int(input())
count = 0
for _ in range(n):
s = [int(a) for a in input().split()]
count += s[1] - (s[0]-1)
print(count)
|
s516510036 | p03606 | u642418876 | 1588442136 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 107 | n=int(input())
ans=0
for i in range(n):
l[i],r[i]=map(int,input().split())
ans+=r[i]-l[i]+1
print(ans)
|
s970550574 | p03606 | u129898499 | 1588391117 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 115 | N = int(input())
counter = 0
for i in range(N):
l,n = map(int,input().split())
counter += (n-l+1)
print(counter) |
s756099986 | p03606 | u129898499 | 1588390938 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 119 | N = int(input())
counter = 0
for i in range(N):
l,n = map(int,input().split())
counter += (n - l + 1)
print(counter) |
s519454954 | p03606 | u129898499 | 1588390919 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 118 | N = int(input())
counter = 0
for i in range(N)
l,n = map(int,input().split())
counter += (n - l + 1)
print(counter) |
s910879604 | p03606 | u681323954 | 1588273915 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 109 | n=int(input())
cnt=0
for i in range(n):
List=map(int,input().split())
cnt += List[1]-List[0]+1
print(cnt) |
s375896966 | p03606 | u437215432 | 1587930265 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 141 | n = int(input())
lr = [0] * n
for i in range(n):
lr[i] = list(map(int, int().split()))
s = 0
for i, j in lr:
s += j - i + 1
print(s)
|
s027563049 | p03606 | u437215432 | 1587930100 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 166 | n = int(input())
lr = [0] * n
for i in range(n):
lr[i] = list(map(int, int().split()))
s = 0
for i in range(0, len(lr), 2):
s += lr[i+1] - lr[i] + 1
print(s)
|
s998154556 | p03606 | u156815136 | 1587645723 | Python | Python (3.4.3) | py | Runtime Error | 38 | 3828 | 973 | #from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
#from itertools import combinations # (string,3) 3回
#from collections import deque
#import collections.defaultdict
#import bisect
#
# d = m - k[i] - k[j]
# if kk[bisect.bisect_righ... |
s676752948 | p03606 | u994988729 | 1587642191 | Python | Python (3.4.3) | py | Runtime Error | 272 | 18344 | 229 | import numpy as np
N = int(input())
seat = np.zeros(N + 100, dtype=int)
L, R = np.array([input().split() for _ in range(N)], dtype=int).T
np.add.at(seat, L, 1)
np.add.at(seat, R+1, -1)
np.cumsum(seat, out=seat)
print(seat.sum()) |
s669695591 | p03606 | u846385882 | 1587641904 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 95 | N=int(input())
K=0
for i in N:
l,r = map(int,input().split())
K=(r-l+1)+K
print(K)
|
s542776303 | p03606 | u846385882 | 1587641854 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 101 | N=int(input())
K=0
for i in N:
l[i],r[i] = map(int,input().split())
K+=(r[i]-l[i]+1)
print(K) |
s709668509 | p03606 | u846385882 | 1587641799 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 100 | N=int(input())
K=0
for i in N
l[i],r[i] = map(int,input().split())
K+=(r[i]-l[i]+1)
print(K) |
s880672598 | p03606 | u644907318 | 1587641735 | Python | PyPy3 (2.4.0) | py | Runtime Error | 176 | 38256 | 141 | N = int(input())
A = [list(map(int,input()).split()) for _ in range(N)]
cnt = 0
for i in range(N):
l,r = A[i]
cnt += r-l+1
print(cnt) |
s490772195 | p03606 | u252964975 | 1587518960 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 108 | n=int(input())
num = 0
for i in range(N):
a,b=map(int, input().split())
num = num + b - a + 1
print(num) |
s260387449 | p03606 | u535659144 | 1587153149 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 7 | 1
24 30 |
s441370653 | p03606 | u852790844 | 1587011453 | Python | Python (3.4.3) | py | Runtime Error | 150 | 12488 | 169 | import numpy as np
read = sys.stdin.buffer.read
n = int(input())
p = np.array(read().split(), dtype=np.int64).reshape(-1,2)
ans = np.sum((p[:,1]-p[:,0])+1)
print(ans) |
s871651406 | p03606 | u054717609 | 1586989357 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 136 | n=map(int,input(n))
for i in range(1,n+1):
l=input()
l=int(l)
r=input()
r=int(r)
a=(r-l)+1
print(a)
|
s237020855 | p03606 | u799428010 | 1586989356 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 85 | N=int(input())
for i in range(N)
l,n=map(int,input().split())
ans=l-n+1
print(ans) |
s283358824 | p03606 | u799428010 | 1586988284 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 111 | N=int(input())
x=[0]*N
y=[0]*N
for i in range(N):
x[i],y[i]=map(int,input(),split())
ans=x-y+1
print(ans) |
s740423062 | p03606 | u277448038 | 1584831640 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 93 | n =input()
ans =0
for i in range(n):
a, b =map(int, input().split())
ans +=b-a
print(ans) |
s549373382 | p03606 | u277448038 | 1584831595 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 94 | n =input()
ans =0
for i in range(n)
a, b =map(int, input().split())
ans +=b-a
print(ans)
|
s954747508 | p03606 | u559250296 | 1584156948 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 127 | N = int(input())
i =0
ans =0
while i < N:
a = int(input())
b = int(input())
ans += b - a +1
i += 1
print(ans) |
s170251509 | p03606 | u757030836 | 1583185570 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 132 | n = int(input())
lr = [int(i) for i in input().split()]
ans = 0
for i in range(n):
ans += lr[i][1] -lr[i][0] +1
print(ans) |
s371448624 | p03606 | u904151472 | 1581128645 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 374 |
def theather():
total = 0
try:
N = int(input())
l_r = (list(map(lambda x: int(x), input().split(' '))) for _ in range(N))
except:
return
if not (1 <= N and N <= 1000): return
for l, r in l_r:
if 1 <= l and l <= 100000 or 1 <= r and r <= 100000:
total += r - l + 1
else:
return
... |
s343065046 | p03606 | u268792407 | 1580812350 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 113 | n=int(input())
lr=[list(map(int,input().split())) for i in range(n)]
ans=0
for i in lr:
ans += r-l+1
print(ans) |
s958985805 | p03606 | u557494880 | 1580709378 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 98 | N = int(input())
ans = N
for i in range(N):
a,b = map(int,input())
ans += b - a
print(ans) |
s273152417 | p03606 | u067983636 | 1580339177 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 112 | N = int(input())
res = 0
for _ in range(N)
r, l = map(int, input().split())
res += l - r + 1
print(res)
|
s086270128 | p03606 | u067983636 | 1580339122 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 107 | N = int(input())
res = 0
for _ in range(N)
r, l = map(int, input().split())
res += l - r + 1
print(res) |
s396926471 | p03606 | u414458988 | 1580157420 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38256 | 73 | print(sum(1-eval(input().replace(" ", "-")) for _ in range(int(input()))) |
s572251602 | p03606 | u779170803 | 1580107046 | Python | Python (3.4.3) | py | Runtime Error | 16 | 2940 | 369 | INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
n=INT()
ans=0
for i n range(n):
l,r=INTM()
ans+=r-l+1
... |
s506696983 | p03606 | u127499732 | 1580019745 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3060 | 101 | n = int(input())
c = 0
for _ in range(n):
n,m = map(int,input().split())
c += m-n+1
print(count) |
s548400933 | p03606 | u127499732 | 1580019705 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 105 | n = int(input())
c = 0
for _ in range(n):
n,m = map(int,input().split())
count += m-n+1
print(count) |
s922518283 | p03606 | u127499732 | 1580019670 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 100 | n = input()
c = 0
for _ in range(n):
n,m = map(int,input().split())
count += m-n+1
print(count) |
s586050230 | p03606 | u686036872 | 1578897244 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | N=int(input())
sum=0
for i range(N):
l, r =map(int, input().split())
sum+=(r-l+1)
print(sum)
|
s536258963 | p03606 | u686036872 | 1578897150 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 36 | N=int(input())
sum=0
for i range(N): |
s619759968 | p03606 | u686036872 | 1578897085 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 70 | N=int(input())
sum=0
for i range(N):
l, r =map(int, input().split()) |
s307488811 | p03606 | u686036872 | 1578897044 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 96 | N=int(input())
sum=0
for i range(N):
l, r =map(int, input().split())
sum+=(r-l+1)
print(sum) |
s603957671 | p03606 | u686036872 | 1578896871 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 70 | N=int(input())
sum=0
for i range(N):
l, r =map(int,input().split())
|
s825932930 | p03606 | u686036872 | 1578896622 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 95 | N=int(input())
sum=0
for i range(N):
l, r =map(int,input().split())
sum+=(r-l+1)
print(sum) |
s233621214 | p03606 | u686036872 | 1578896551 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 103 | N=int(input())
sum=0
for i range(N):
l, r =map(int, input().split())
sum+=(r-l+1)
print(100000-sum) |
s095845696 | p03606 | u686036872 | 1578896459 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 100 | N=int(input())
sum=0
for i range(N):
l, r =map(int,input().split())
sum+=r-l+1
print(100000-sum) |
s718260639 | p03606 | u102242691 | 1577851104 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 9 | 2
6 8
3 3 |
s596511004 | p03606 | u595375942 | 1577658852 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 73 | print(sum(1-eval(input().replace(' ','-')), for _ in range(int(input()))) |
s058973763 | p03606 | u994521204 | 1576095056 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 94 | c=0
N=int(input())
for i in range(N):
*A=map(int, input().split())
c+=A[1]-A[0]+1
print(c) |
s405318741 | p03606 | u780475861 | 1575671308 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 111 | lst = [[int(i) for i in input().split()] for _ in range(n)]
p = 0
for i in lst:
p += i[1] - i[0] + 1
print(p) |
s573103178 | p03606 | u780475861 | 1575671285 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 197 | import sys
lst = [[int(j) for j in i] for i in sys.stdin.readlines()]n = int(input())
lst = [[int(i) for i in input().split()] for _ in range(n)]
p = 0
for i in lst:
p += i[1] - i[0] + 1
print(p) |
s318242589 | p03606 | u796060588 | 1571244327 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3056 | 223 |
import sys
def main():
N = input()
ans = 0
for _ in range(N):
l, r = map(int, sys.stdin.readline().rstrip().split())
ans += abs(r-l) + 1
print(ans)
if __name__ == "__main__":
main()
|
s326319901 | p03606 | u991269553 | 1570307213 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3060 | 239 | n = int(input())
s = 0
for i in range(n):
a = list(input().split())
print(a)
l = [0]
r = [0]
for m in range(n):
l.append(a[m])
r.append(a[m+1])
print(l)
print(r)
for p in range(1,n+1):
s += int(r[p])-int(l[p])+1
print(s) |
s350420325 | p03606 | u991269553 | 1570307174 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 287 | n = int(input())
s = 0
for i in range(n):
a = list(input().split())
"""
a = [input().split() for i in range(n)]
"""
print(a)
l = [0]
r = [0]
for m in range(n):
l.append(a[m])
r.append(a[m+1])
print(l)
print(r)
for p in range(1,n+1):
s += int(r[p])-int(l[p])+1
print(s) |
s857048978 | p03606 | u991269553 | 1570306523 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 216 | n = int(input())
s = 0
for i in range(n):
a = list(input().split())
l = [0]
r = [0]
for m in range(n):
l.append(a[m][0])
r.append(a[m][1])
for p in range(1,n+1):
s += int(r[p])-int(l[p])+1
print(s) |
s567794275 | p03606 | u074338678 | 1569792671 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 154 | N = int(input())
a=[list(map(int,input().split())) for i in range(N)]
count = 0
for i in range(N+1):
count += a[i][1] - a[i][0] + 1
print(count)
|
s800386363 | p03606 | u074338678 | 1569792451 | Python | Python (3.4.3) | py | Runtime Error | 20 | 2940 | 120 | N = int(input())
count = 0
for i in range(N+1):
l, r = map(int, input().split())
count += r-l+1
print(count)
|
s555145503 | p03606 | u074338678 | 1569792420 | Python | Python (3.4.3) | py | Runtime Error | 20 | 2940 | 120 | N = int(input())
count = 0
for i in range(N+1):
l, r = map(int, input().split())
count += l-r+1
print(count)
|
s824051866 | p03606 | u027929618 | 1569468857 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3828 | 140 | N=int(input())
cnt = [0]*100000
for i in range(N):
l, r = map(int, input().split())
for j in range(l, r+1):
cnt[j]=1
print(sum(cnt)) |
s253459909 | p03606 | u027929618 | 1569468812 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3828 | 141 | N=int(input())
cnt = [0]*100000
for i in range(N):
l, r = map(int, input().split())
for j in range(l, r+1):
cnt[j]+=1
print(sum(cnt)) |
s044035892 | p03606 | u980322611 | 1568578058 | Python | PyPy3 (2.4.0) | py | Runtime Error | 178 | 38256 | 98 | N = int(input())
ans = 0
for i in range(N):
l,r = map(int,input())
ans += r-l+1
print(ans) |
s064290076 | p03606 | u546853743 | 1567715354 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 90 | N=int(input())
ans=0
for i in range(N):
l,r=map(int,input().split())
ans+=r-l+1
print(ans) |
s738435115 | p03606 | u371530330 | 1566323574 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3440 | 151 | n = int(input())
l,r = [map(int, input().split()) for i in range(n)]
number = 0
for i in range(n):
number = number + (r[i]-l[i]+1)
print(number) |
s478136922 | p03606 | u652892331 | 1565973770 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 114 | n = int(input())
count = 0
for input in range(n):
a, b = int(input().split())
count += b-a+1
print(count) |
s051931590 | p03606 | u842388336 | 1565794719 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 94 | N = int(input())
cnt=0
for _ in range(N):
l,r = map(int,input())
cnt+=(1+(r-l))
print(cnt) |
s388094223 | p03606 | u798316285 | 1565726129 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | N=int(input())
X=0
for i in range(N):
l,n=map(int,input().split())
x+=l-n+1
print(X) |
s804278350 | p03606 | u802963389 | 1565717212 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 114 | n = int(input())
lr = [list(map(int, input().split())) for _ in range(n)]
print(sum([i[1] -1[0] + 1 for i in lr])) |
s733673219 | p03606 | u946424121 | 1565643736 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 109 | n = int(input())
sum = 0
for i in range(n):
l, r = map(int, input().split())
sum + = r-l+1
print(sum)
|
s756466061 | p03606 | u408620326 | 1565570953 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 104 | N=int(input())
res=0
for n in N:
l,r=[int(x) for x in input().split()]
res+=r-l+1
else:
print(res) |
s471221960 | p03606 | u302292660 | 1564722714 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | n = input()
sum = 0
for i in range(n):
l,r = map(int,input().split())
sum += r - l + 1
print(sum)
|
s738091483 | p03606 | u123745130 | 1563567583 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 65 | x,*y=map(int,open(0).split())
print(sum(y[1::2])-sum(y[0::2])+x)
|
s726437046 | p03606 | u123745130 | 1563567545 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 57 | x,*y=map(int,open(0))
print(sum(y[1::2])-sum(y[0::2])+x)
|
s765001033 | p03606 | u123745130 | 1563566841 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 66 | x,*y=map(int,open(0).read().split())
print(sum(y[0::2]-y[1::2])+x) |
s353264964 | p03606 | u462329577 | 1561692998 | Python | PyPy3 (2.4.0) | py | Runtime Error | 164 | 38256 | 381 | def print_ans(l,r,N):
"""print(sum(r)-sum(l)+N)
Parameters
--------------
>>> print_ans([24],[30],1)
7
>>> print_ans([6,3],[8,3],2)
4
"""
print(sum(r)-sum(l)+N)
def main():
N = input()
l = []
r = []
for i in range(N):
s = list(map(int,input().split()))
l.add(s[0])
r.add(s[1]... |
s496685132 | p03606 | u462329577 | 1561692926 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38256 | 381 | def print_ans(l,r,N):
"""print(sum(r)-sum(l)+N)
Parameters
--------------
>>> print_ans([24],[30],1)
7
>>> print_ans([6,3],[8,3],2)
4
"""
print(sum(r)-sum(l)+N)
def main():
N = input()
l = []
r = []
for i in range(N):
s = list(map(int,input().split()))
l.add(s[0])
r.add(s[1]... |
s311295238 | p03606 | u663014688 | 1560790243 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 103 | N = int(input())
for i in range(N):
l,r = map(int, input().split())
ans += r - l + 1
print(ans) |
s009706533 | p03606 | u405256066 | 1560566179 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 208 | from sys import stdin
N = int(stdin.readline().rstrip())
for _ in range(N):
data.append([int(x) for x in stdin.readline().rstrip().split()])
ans = 0
for i in data:
ans += (i[1] - i[0] + 1)
print(ans) |
s392267137 | p03606 | u114648678 | 1558467166 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 9 | 2
6 8
3 3 |
s910489022 | p03606 | u167681750 | 1558155979 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 109 | n = input()
ans = 0
for i in range(n):
l, r = map(int, (input().split()))
ans += r - l + 1
print(ans) |
s730314151 | p03606 | u919633157 | 1557782747 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 100 | n=int(input())
ans=0
for i in range(n):
ans+=(eval(input().replace(' ','-')[::-1]))+1
print(ans) |
s395913548 | p03606 | u980492406 | 1555825293 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 111 | N = int(input())
a = 0
for i in range(N):
l, r = map(int, input().split())
ans += r - l + 1
print(a) |
s164063143 | p03606 | u548545174 | 1555612689 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 104 | N = int(input())
ans = 0
for i in range(N):
l, r = input().split()
ans += (r - l) + 1
print(ans) |
s063410787 | p03606 | u771532493 | 1554667704 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 101 | n=int(input())
ans=0
for i in range(n):
r,l=int(i) for i in input().split()
ans+=l-r+1
print(ans) |
s364804079 | p03606 | u881378225 | 1554078556 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 101 | N=int(input())
answer=0
for i in range(N):
l,r = map(input().split())
answer+=r-l+1
print(answer) |
s485028478 | p03606 | u881378225 | 1554070952 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3888 | 168 | N=int(input())
sum=0
seats=[False for i in range(100000)]
for i in range(N):
l,r=map(int,input.split())
for j in range(l-1,r-1):
seats[j]=True
print(sum(seats)) |
s359156028 | p03606 | u501643136 | 1553648780 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 97 | n, a = int(input()), 0
for i in range(n):
l, r = int(input().split())
a += r - l + 1
print(a) |
s456103292 | p03606 | u156612348 | 1552844760 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 119 | n=int(input())
l,r=[],[]
for i in range(n):
l.append(int(input()))
r.append(int(input()))
ans=r[i]-l[i]+1
print(ans) |
s388157825 | p03606 | u782685137 | 1551410089 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 58 | p gets.to_i.times.map{eval"-%d+%d+1"%gets.split}.inject :+ |
s632795952 | p03606 | u652081898 | 1551359669 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 127 | n = int(input())
ans = []
for i in range(n):
l, r = map(int, input().split())
ans.append(abs(l, r)+1)
print(sum(ans)) |
s012034811 | p03606 | u945418216 | 1550785487 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 528 | # 075B
h,w = map(int, input().split())
ss = [list(map(str,str(input()))) for _ in range(h)]
# print(ss)
def count_bombs(ss,i,j):
count=0
if ss[i][j]=='#':
return '#'
for y in [-1,0,1]:
for x in [-1,0,1]:
# print(i+y, x+j, count)
if 0<=i+y<h and 0<=j+x<w and ss[i+y][j+... |
s850260490 | p03606 | u367130284 | 1550677847 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 715 | h,w=map(int,input().split())
a=[[0 if s=="." else "#" for s in list(input())] for i in range(h)]
for _ in range(h):
for s in range(w):
if a[_][s]=="#":
try:
a[_-1][s]+=1
except:
continue
try:
a[_+1][s]+=1
except:
continue
try:
a[_][s-1]+=1
... |
s532741097 | p03606 | u385167811 | 1545883736 | Python | Python (3.4.3) | py | Runtime Error | 38 | 4084 | 245 | import collections
list = [0] * 100000
N = int(input())
for i in range(N):
t = input().split(" ")
L = int(t[0])
R = int(t[1])
for j in range(L-1,R):
list[j] = 1
CC = collections.Counter(list)
print(CC.most_common()[1][1]) |
s657619354 | p03606 | u385167811 | 1545883473 | Python | Python (3.4.3) | py | Runtime Error | 37 | 4084 | 245 | import collections
list = [0] * 100000
N = int(input())
for i in range(N):
t = input().split(" ")
L = int(t[0])
R = int(t[1])
for j in range(L-1,R):
list[j] = 1
CC = collections.Counter(list)
print(CC.most_common()[1][1]) |
s013477315 | p03606 | u920299620 | 1542823813 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 768 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
typedef int64_t llong;
char moji[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z... |
s395957279 | p03606 | u432805419 | 1541560581 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 116 | a = int(input())
b = [input().split() for i in range(a)]
c = 0
for i in range(a):
c += b[i][1]-b[i][0]+1
print(c) |
s932544498 | p03606 | u853900545 | 1539656254 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 83 | n=int(input())
c=0
for i in range(n):
x,y=input().split()
c+=y-x+1
print(c) |
s352512657 | p03606 | u879761680 | 1530729806 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 95 | a = input()
d = 0
for x in range(a):
b ,c = map(int,input().split())
d = c-b+1
print(d) |
s246427658 | p03606 | u158635223 | 1529722356 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 93 | n=int(input())
ans=0
for i in range(n):
l,r=map(int,input())
ans+=r-l+1
print(ans) |
s348226905 | p03606 | u158635223 | 1529722268 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 93 | n=int(input())
ans=0
for i in range(N):
l,r=map(int,input())
ans+=r-l+1
print(ans) |
s990632357 | p03606 | u140251125 | 1529171985 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 136 | # input
N = int(input())
L = [list(map(int, input().split()))]
ans = 0
for i in range(N):
ans += L[i][1] - L[i][0] + 1
print(ans) |
s737979963 | p03606 | u613028067 | 1527187639 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 124 | a=input()
for i in range(a):
s=raw_input().split()
b,c=int(s[0]),int(s[1])
c=c-b
c=c+1
ans=ans+c
print c |
s580017692 | p03606 | u613028067 | 1527114923 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 89 | a=raw_input()
for i in range(a):
b=raw_input()
c=raw_input()
c=c-b
c=c+1
print c-b+1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.