problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03632
u609814378
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int, input().split())\n\nif C <= A and A <= D:\n print(D-A)\nelif D < A :\n print(0)\nelif B < C:\n print(0)\nelif A <= C and B <= D:\n print(C-A)', 'A,B,C,D = map(int, input().split())\n\nif(C-B>0 or A-D>0):\n print(0)\n exit()\nstart=max(A,C)\nend=min(B,D)\nprint(end-start)']
['Wrong Answer', 'Accepted']
['s864382254', 's527702989']
[2940.0, 2940.0]
[17.0, 17.0]
[163, 125]
p03632
u625963200
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\n\nba=[i for i in range(a,b+1)]\ndc=[i for i in range(c,d+1)]\nans=0\nprint(min(a,b,c,d),max(a,b,c,d))\nfor i in range(min(a,b,c,d),max(a,b,c,d)):\n if i in ba and i in dc:\n ans+=1\nif ans==0:\n print(0)\nelse:\n print(ans-1)', 'a,b,c,d=map(int,input().split())\n\nif max(a,c)<min(b,d):\n print(min(b,d)-max(a,c))\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s675011784', 's887871985']
[3064.0, 2940.0]
[17.0, 17.0]
[253, 99]
p03632
u626337957
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nprint(min(c, d) - max(a, b))', 'a, b, c, d = map(int, input().split())\nprint(max(min(b,d)-max(a,c), 0))']
['Wrong Answer', 'Accepted']
['s988351056', 's702907420']
[2940.0, 2940.0]
[17.0, 17.0]
[67, 71]
p03632
u629350026
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nif b<=c:\n print(b-a+d-c)\nelse:\n print(d-a)', 'a,b,c,d=map(int,input().split())\nif b<=c or d<=a:\n print(0)\nelif a<=c and d<=b:\n print(d-c)\nelif c<=a and b<=d:\n print(b-a)\nelif a<=c:\n print(abs(b-c))\nelse:\n print(abs(a-d))']
['Wrong Answer', 'Accepted']
['s352755803', 's364935676']
[2940.0, 3060.0]
[17.0, 17.0]
[77, 179]
p03632
u635931083
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['def dup(A, B):\n r = 0\n for x in A:\n print(x)\n if x in B:\n r = r + 1\n return r\n\n\na, b, c, d = (int(i) for i in input().split())\n\nA = range(a, b+1)\nB = range(c, d+1)\n\nresult = dup(A, B) if len(A) <= len(B) else dup(B, A)\n\nprint(result)\n', 'def dup(A, B):\n r = 0\n for x in A:\n if x in B:\n r = r + 1\n return r-1 if r != 0 else 0\n\n\na, b, c, d = (int(i) for i in input().split())\n\nA = range(a, b+1)\nB = range(c, d+1)\n\nresult = dup(A, B) if len(A) <= len(B) else dup(B, A)\n\nprint(result)\n']
['Wrong Answer', 'Accepted']
['s364932431', 's308668874']
[3060.0, 3060.0]
[17.0, 18.0]
[266, 268]
p03632
u637824361
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['T = [int(i) for i in input().split()]\nif T[0] >= T[3] or T[2] >= T[1]:\n print(0)\nelif T[0] >= T[2]:\n print(T[1] - T[2])\nelif T[2] >= T[0]:\n print(T[3] - T[0])', 'T = [int(i) for i in input().split()]\nif T[0] >= T[3] or T[2] >= T[1]:\n print(0)\nelif T[0] >= T[2]:\n print(min(T[3] - T[0], T[1] - T[0]))\nelif T[2] >= T[0]:\n print(min(T[3] - T[2], T[1] - T[2]))']
['Wrong Answer', 'Accepted']
['s782478035', 's387685673']
[3064.0, 3064.0]
[17.0, 17.0]
[161, 197]
p03632
u640603056
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['\nimport sys\n\n\ndef ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))\ndef ISI(): return map(int, sys.stdin.readline().rstrip().split())\ndef II(): return int(sys.stdin.readline().rstrip())\ndef ISS(): return sys.stdin.readline().rstrip().split()\ndef IS(): return sys.stdin.readline().rstrip()\n\nA, B, C, D = ISI()\nans = 0\nfor i in range(A, B):\n if C < i <= D:\n ans += 1\nprint(ans)', '\nimport sys\n\n\ndef ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))\ndef ISI(): return map(int, sys.stdin.readline().rstrip().split())\ndef II(): return int(sys.stdin.readline().rstrip())\ndef ISS(): return sys.stdin.readline().rstrip().split()\ndef IS(): return sys.stdin.readline().rstrip()\n\nA, B, C, D = ISI()\nans = 0\nfor i in range(1, 101):\n if A < i <= B and C < i <= D:\n ans += 1\nprint(ans)']
['Wrong Answer', 'Accepted']
['s361878269', 's815773541']
[3064.0, 3064.0]
[17.0, 17.0]
[429, 446]
p03632
u642874916
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\n\nstart = min(a, c)\nfinish = min(b, d)\n\nprint(start - finish)', 'a, b, c, d = map(int, input().split())\n \nstart = max(a, c)\nfinish = min(b, d)\n \nprint(start - finish)', 'a, b, c, d = map(int, input().split())\n \nstart = max(a, c)\nfinish = min(b, d)\n\nif finish - start < 0:\n print(0)\nelse:\n print(finish - start)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s727303897', 's971620743', 's395458144']
[9164.0, 9164.0, 9152.0]
[24.0, 28.0, 29.0]
[99, 101, 142]
p03632
u644907318
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int,input().split())\nif C<=A:\n if D>=B:\n print(B-A)\n elif A<=D:\n print(D-A)\n else:\n print(0)\nelif C<=B:\n if D<=B:\n print(D-C)\n else:\n print(B-C)\n else:\n print(0)\nelse:\n print(0)', 'A,B,C,D = map(int,input().split())\nif C<=A:\n if D>=B:\n print(B-A)\n elif A<=D:\n print(D-A)\n else:\n print(0)\nelif C<=B:\n if D<=B:\n print(D-C)\n else:\n print(B-C)\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s942536628', 's054073517']
[2940.0, 3060.0]
[17.0, 17.0]
[254, 227]
p03632
u651803486
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\n\nlower = max(a,c)\nupper = min(b,d)\n\nprint(upper-lower, 0)', 'a, b, c, d = map(int, input().split())\n\nlower = max(a,c)\nupper = min(b,d)\n\nprint(max(upper-lower, 0))']
['Wrong Answer', 'Accepted']
['s126481169', 's831356447']
[2940.0, 2940.0]
[18.0, 17.0]
[96, 101]
p03632
u651879504
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = list(map(int,input().split()))\n\nif B <= C and D <= A:\n print(0)\nelse :\n ans_tmp1 = abs(B - C)\n ans_tmp2 = abs(D - C)\n if ans_tmp1 >= ans_tmp2:\n print(ans_tmp2)\n else:\n print(ans_tmp1))', 'A,B,C,D = list(map(int,input().split()))\n\nif B - C > 0 and D - A > 0:\n start = max(A,C)\n stop = min(B,D)\n print(stop - start)\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s285750671', 's410817792']
[2940.0, 2940.0]
[17.0, 17.0]
[223, 153]
p03632
u652656291
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\ns = range(a,b+1)\nm = range(c,d+1)\nAns = list(set(s)|set(m))\nprint(len(Ans))', 'a,b,c,d = map(int,input().split())\nans = min(b,d)-max(a,c)\nif ans >=0:\n print(ans)\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s652677324', 's292636690']
[3060.0, 2940.0]
[17.0, 17.0]
[110, 100]
p03632
u659100741
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nans = 0\nif c < b:\n if c < a and c > d:\n ans = b-c\n elif c > a and c > d:\n ans = d-c\n elif c < a and d > a:\n ans = d-a\nprint(ans)\n', 'a,b,c,d = map(int,input().split())\nans = 0\nif c < b:\n if c > d:\n ans = b-c\n else:\n ans = d-c\nprint(ans)\n', 'a,b,c,d = map(int,input().split())\nans = 0\nif c <= b and d >= a:\n if c <= a and c >= d:\n ans = b-c\n elif c >= a and c >= d:\n ans = d-c\n elif c <= a and d >= a:\n ans = d-a\nprint(ans)\n', 'a,b,c,d = map(int,input().split())\nans = 0\nif c < b:\n if c < a and c > d:\n ans = b-c\n elif c > a and c > d:\n ans = d-c\n else:\n ans = d-a\nprint(ans)\n', 'a,b,c,d = map(int,input().split())\nans = 0\nif c < b and d > a:\n if c < a and c > d:\n ans = b-c\n elif c > a and c > d:\n ans = d-c\n elif c < a and d > a:\n ans = d-a\nprint(ans)\n', 'a,b,c,d = map(int,input().split())\nans = 0\nif c <= b and d >= a:\n if c <= a and c >= d:\n ans = b-c\n elif c >= a and b >= d:\n ans = d-c\n elif c <= a and d >= a:\n ans = d-a\nprint(ans)\n', 'A,B,C,D = map(int, input().split())\n\nif A < C < B < D:\n print(B-C)\nif A < C < D < B:\n print(D-C)\nif C < A < D < B:\n print(D-A)\nif C < A < B < D:\n print(B-A)\nelse:\n print(0)\n', 'A,B,C,D = map(int, input().split())\n\nif A <= C <= B <= D:\n print(B-C)\nelif A <= C <= D <= B:\n print(D-C)\nelif C <= A <= D <= B:\n print(D-A)\nelif C <= A <= B <= D:\n print(B-A)\nelse:\n print(0)\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s044900421', 's074948786', 's084957304', 's305732873', 's340880424', 's394281534', 's499792612', 's442217901']
[2940.0, 2940.0, 2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0]
[194, 124, 212, 178, 204, 212, 188, 206]
p03632
u660018248
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["a b c d = map(int, input().split())\n\n\nif b<=c:\n print ('0')\n exit()\nelif:\n if b>=d:\n print(d-c)\n exit()\n elif b<d:\n print(b-c)\n exit()", "a, b, c, d = map(int, input().split())\n\n\nif b<=c:\n print ('0')\nelse:\n if b>=d:\n print(str(d-c))\n elif b<d:\n print(str(b-c+1))", 'a, b, c, d = map(int, input().split())\n\nprint(max(0, min(d,b)-max(c,a)))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s354199854', 's658688156', 's406359925']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[174, 148, 72]
p03632
u663438907
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\n \nans = 0\n \nfor i in range(max(A, B, C, D)+1):\n if (A <= i and i <= B) and (C <= i and i <= D):\n ans += 1\n\nif ans <= 1:\n print(ans)\nelif A == C and B == D:\n print(B - A)\nelse:\n print(ans)', 'A, B, C, D = map(int, input().split())\n \nans = 0\n \nfor i in range(max(A, B, C, D)+1):\n if (A <= i and i <= B) and (C <= i and i <= D):\n ans += 1\n print(i)\n \nif ans <= 1:\n print(0)\nelif A == C and B == D:\n print(ans)\nelse:\n print(ans-1)', 'A, B, C, D = map(int, input().split())\n \nans = 0\n \nfor i in range(max(A, B, C, D)+1):\n if (A <= i and i <= B) and (C <= i and i <= D):\n ans += 1\n \nif ans <= 1:\n print(0)\nelif A == C and B == D:\n print(B - A)\nelse:\n print(ans)', 'A, B, C, D = map(int, input().split())\n \nans = 0\n \nfor i in range(max(A, B, C, D)+1):\n if (A <= i and i <= B) and (C <= i and i <= D):\n ans += 1\n \nif ans <= 1:\n print(0)\nelif A == C and B == D:\n print(ans - 1)\nelse:\n print(ans-1)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s128842216', 's350040434', 's572862218', 's153813463']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0, 17.0]
[233, 243, 232, 236]
p03632
u665038048
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nprint(min(b, d)-min(a, c))\n', 'a, b, c, d = map(int, input().split())\nif b < c:\n print(min(b, d)-max(a, c))\nelse:\n print(0)', 'a, b, c, d = map(int, input().split())\nans = min(b, d)-max(a, c)\nif ans < 0:\n print(0)\nelse:\n print(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s116040360', 's225544851', 's960635512']
[2940.0, 3064.0, 2940.0]
[17.0, 19.0, 17.0]
[66, 98, 110]
p03632
u667024514
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input())\nprint(min(b,d)-max(a,c))', 'a,b,c,d = map(int,input().split())\ncou = 0\nfor i in range(101):\n if a <= i and i <= b and c <= i and i <= d:\n cou += 1\nprint(cou)', 'a,b,c,d = map(int,input().split())\nlisa = []\nlisb = []\nfor n in range((b-a)+1):\n lisa.append(n + a)\nfor m in range((d-c)+1):\n lisb.append(m + c)\nans = 0\nfor i in range(101):\n if i in lisa and i in lisb:\n ans += 1\nif ans > 0:\n print(ans-1)\nelse:\n print(ans)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s113368352', 's343541085', 's443167706']
[2940.0, 2940.0, 3064.0]
[17.0, 17.0, 17.0]
[51, 133, 264]
p03632
u669770658
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["def abc070_b():\n a, b, c, d = map(int, input().split())\n\n if c < b or d < a:\n return 0\n\n if c < a < b < d:\n return b - a\n\n if a < c < b < d:\n return b - c\n\n if a < c < d < b:\n return d - c\n\n\nif __name__ == '__main__':\n print(abc070_b())", "def abc070_b():\n a, b, c, d = map(int, input().split())\n \n if c > b:\n return 0\n \n if c < a < b < d:\n return b - a\n \n if a < c < b < d:\n return b - c\n \n if a < c < d < b:\n return d - c\n \n \nif __name__ == '__main__':\n print(abc048_b())", "def abc070_b():\n a, b, c, d = map(int, input().split())\n\n if c < b or c < d < a < b:\n return 0\n\n if c < a < b < d:\n return b - a\n\n if a < c < b < d:\n return b - c\n\n if a < c < d < b:\n return d - c\n\n\nif __name__ == '__main__':\n print(abc070_b())\n", "def abc070_b():\n a, b, c, d = map(int, input().split())\n\n if c <= a < b <= d:\n return b - a\n\n if a <= c < d <= b:\n return d - c\n\n if a <= c < b <= d:\n return b - c\n\n if c <= a < d <= b:\n return d - a\n\n if b <= c or d <= a:\n return 0\n\n\nif __name__ == '__main__':\n print(abc070_b())\n"]
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s548151866', 's746283545', 's885520181', 's262386180']
[3060.0, 3064.0, 2940.0, 3060.0]
[20.0, 18.0, 17.0, 18.0]
[282, 297, 291, 337]
p03632
u686390526
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D=list(map(int, input().split()))\nma=max(A,B)\nmi=min(C,D)\nprint(mi-ma)', 'A,B,C,D=list(map(int, input().split()))\nma=min(B,D)\nmi=max(A,C)\nc=ma-mi\nif c<0:\n c=0\nprint(c)']
['Wrong Answer', 'Accepted']
['s280291431', 's137131672']
[2940.0, 2940.0]
[18.0, 18.0]
[76, 94]
p03632
u693929358
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=list(map(int,input().split()))\nprint(max(max(b,d)-min(a,c),0))', 'a,b,c,d=list(map(int,input().split()))\nprint(max(min(b,d)-max(a,c),0))']
['Wrong Answer', 'Accepted']
['s990380345', 's277246082']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 70]
p03632
u695079172
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d =map(int,input().split())\n\nanswer = min(b,c) - max(a,c)\nprint(max(0,answer))', '\na,b,c,d =map(int,input().split())\n\nanswer = min(b,d) - max(a,c)\nprint(max(0,answer))\n']
['Wrong Answer', 'Accepted']
['s199669313', 's896708139']
[2940.0, 2940.0]
[18.0, 17.0]
[84, 86]
p03632
u705418271
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\ne=max(a,b)\nf=min(c,d)\nif e<f:\n print(f-e)\nelse:\n print(0)', 'a,b,c,d=map(int,input().split())\ne=max(a,c)\nf=min(b,d)\nif e<f:\n print(f-e)\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s237287541', 's499673350']
[9100.0, 9056.0]
[29.0, 25.0]
[92, 92]
p03632
u708255304
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nprint(max(min(C, D)-max(A, B), 0))', 'A, B, C, D = map(int, input().split())\nprint(max(min(B, D)-max(A, C), 0))\n']
['Wrong Answer', 'Accepted']
['s220427687', 's169671423']
[2940.0, 2940.0]
[17.0, 17.0]
[73, 74]
p03632
u717001163
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map((int,input().split()))\nstart=min(a,b)\nend=min(c,d)\nprint(end-start if end-start > 0 else 0)', 'a,b,c,d=map(int,input().split())\nstart=min(a,c)\nend=min(b,d)\nprint(end-start if end-start > 0 else 0)', 'a,b,c,d=map(int,input().split())\nstart=max(a,c)\nend=min(b,d)\nprint(end-start if end-start > 0 else 0)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s425281406', 's809543043', 's828793378']
[3060.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[103, 101, 101]
p03632
u721425712
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\n\nalice = []\nbob = []\nfor i in range(a, b+1):\n alice.append(i)\nfor j in range(c, d+1):\n bob.append(j)\n\ncount = 0\nfor k in range(1001):\n if k in alice and k in bob:\n print(k)\n count += 1\n else:\n continue\n \nif count > 0:\n print(count-1) \nelse: \n print(0)', 'a, b, c, d = map(int, input().split())\n\nalice = []\nbob = []\nfor i in range(a, b+1):\n alice.append(i)\nfor j in range(c, d+1):\n bob.append(j)\n\ncount = 0\nfor k in range(1001):\n if k in alice and k in bob:\n count += 1\n print(k)\n else:\n continue\n \nprint(count-1)', 'a, b, c, d = map(int, input().split())\n \ncnt = [0]*101\nfor i in range(a, b+1):\n cnt[i] += 1\nfor j in range(c, d+1):\n cnt[j] += 1\n \nans = cnt.count(2) - 1\nif ans == -1:\n print(0)\nelse:\n print(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s145990498', 's679198486', 's831290958']
[3064.0, 3064.0, 3060.0]
[18.0, 19.0, 17.0]
[336, 297, 207]
p03632
u728498511
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['n = list(map(int, input().split()))\na = list(range(n[0], n[1]+1))\nb = list(range(n[2], n[3]+1))\nprint(len(set(a) & set(b)))', 'n = list(map(int, input().split()))\na = list(range(n[0], n[1]+1))\nb = list(range(n[2], n[3]+1))\nprint(max(0, len(set(a) & set(b))-1))']
['Wrong Answer', 'Accepted']
['s598618317', 's218299651']
[3060.0, 3060.0]
[17.0, 17.0]
[123, 133]
p03632
u729707098
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = (int(i) for i in input().split())\nprint(max(max(a,c)-min(b,d),0))', 'a,b,c,d = (int(i) for i in input().split())\nprint(max(min(b,d)-max(a,c),0))']
['Wrong Answer', 'Accepted']
['s395477191', 's570895356']
[2940.0, 2940.0]
[17.0, 17.0]
[75, 75]
p03632
u736729525
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nif C < B:\n A, B, C, D = C, D, A, B\nif B <= C:\n print(0)\nelse:\n print(min(B, D) - C)\n ', 'A, B, C, D = map(int, input().split())\nif A > C:\n A, B, C, D = C, D, A, B\nif B <= C:\n print(0)\nelse:\n print(min(B, D) - C)\n ']
['Wrong Answer', 'Accepted']
['s381463966', 's797568460']
[2940.0, 2940.0]
[17.0, 17.0]
[128, 128]
p03632
u739843002
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = list(map(lambda t: int(t), input().split(" ")))\n\nif B - A + D - C <= max([D - A, B - C]):\n print(0)\nelse:\n print(max([A, C]) - min([B, D]))', 'A, B, C, D = list(map(lambda t: int(t), input().split(" ")))\n \nif B - A + D - C <= max([D - A, B - C]):\n print(0)\nelse:\n print(min([B, D]) - max([A, C]))']
['Wrong Answer', 'Accepted']
['s268214808', 's806844416']
[9120.0, 9124.0]
[28.0, 28.0]
[154, 155]
p03632
u740767776
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nif a < c < b < d:\n print(d-c)\nelif c < a < b < d:\n print(b-a)\nelif a < c < d < b:\n print(d-c)\nelif c < a < d < b:\n print(d-a)\nelse:\n print(0)', 'a,b,c,d=map(int,input().split())\nif a <= c <= b <= d:\n print(b-c)\nelif c <= a <= b <= d:\n print(b-a)\nelif a <= c <= d <= b:\n print(d-c)\nelif c <= a <= d <= b:\n print(d-a)\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s965143314', 's687919177']
[3060.0, 3060.0]
[17.0, 18.0]
[189, 201]
p03632
u745097373
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["def solve():\n a, b, c, d = read()\n result = think(a, b, c, d)\n write(result)\n\n\ndef read():\n return read_int(4)\n\n\ndef read_int(n):\n return list(map(lambda x: int(x), read_line().split(' ')))[:n]\n\n\ndef think(a, b, c, d):\n if b <= c or d <= a:\n return 0\n elif a <= c and d <= b:\n return d - c\n elif c <= a and b <= d:\n return b - a\n else:\n if a == c:\n return min(b, d) - a\n elif a < c:\n return abs(c - b)\n else: # a > c\n return abs(d - a)\n\n\ndef write(result):\n print(result)\n\n\nif __name__ == '__main__':\n solve()", "def solve():\n a, b, c, d = read()\n result = think(a, b, c, d)\n write(result)\n\n\ndef read():\n return read_int(4)\n\n\ndef read_int(n):\n return list(map(lambda x: int(x), read_line().split(' ')))[:n]\n\n\ndef read_line(n=0):\n if n == 0:\n return input().rstrip()\n else:\n return input().rstrip()[:n]\n\n\ndef think(a, b, c, d):\n if b <= c or d <= a:\n return 0\n elif a <= c and d <= b:\n return d - c\n elif c <= a and b <= d:\n return b - a\n else:\n if a == c:\n return min(b, d) - a\n elif a < c:\n return abs(c - b)\n else: # a > c\n return abs(d - a)\n\n\ndef write(result):\n print(result)\n\n\nif __name__ == '__main__':\n solve()"]
['Runtime Error', 'Accepted']
['s149793243', 's421818548']
[3064.0, 3064.0]
[18.0, 17.0]
[618, 733]
p03632
u749770850
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nprint(max(0,max(a,c)-min(b,d)))', 'a, b, c, d = map(int, input().split())\nprint(max(0,min(b,d)-max(a,c)))']
['Wrong Answer', 'Accepted']
['s301787221', 's004967052']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 70]
p03632
u751549333
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
[' a, b, c, d = map(int, input().split())\nprint(max(min(b, d) - max(a, c), 0))', 'a, b, c, d = map(int, input().split())\nprint(max(min(b, d) - max(a, c), 0))']
['Runtime Error', 'Accepted']
['s017410815', 's966154442']
[8992.0, 9152.0]
[25.0, 27.0]
[76, 75]
p03632
u757030836
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\n\nif b <= c:\n print(0)\n exit()\n \nif b <= d:\n print(d-c)\nelse:\n print(b-c)', 'a, b, c, d = map(int, input().split())\nans = 0\nfor i in range(0, 101):\n if a < i <= b and c < i <= d:\n ans += 1\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s671855131', 's836264790']
[2940.0, 2940.0]
[17.0, 17.0]
[112, 134]
p03632
u757274384
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int, input(),split())\n\nif b < c or d < a:\n print("0")\nelif a <= c:\n if b <= d:\n print(b-c)\n else:\n print(d-c)\nelse:\n if c <= a:\n print(d-a)\n else:\n print(d-c)', 'a,b,c,d = map(int, input().split())\n \nprint(max(min(b,d) - max(a,c),0))']
['Runtime Error', 'Accepted']
['s696535084', 's338224348']
[3060.0, 2940.0]
[17.0, 17.0]
[189, 71]
p03632
u766407523
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nresult = min(C, D)-max(A, B)\nif result < 0:\n print(0)\nelse:\n print(result)', 'A, B, C, D = map(int, input().split())\nresult = min(B, D)-max(A, C)\nif result < 0:\n print(0)\nelse:\n print(result)\n']
['Wrong Answer', 'Accepted']
['s171846808', 's343545913']
[3064.0, 2940.0]
[17.0, 17.0]
[119, 120]
p03632
u768816323
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D=(int(i) for i in input().split())\nC-=B\nif C<0:\n print(0)\nelse:\n print(C)', '# your code goes here\nA,B,C,D=(int(i) for i in input().split())\nif A<C:\n A=C\nif B>D:\n B=D\nB-=A\nif B<0:\n print(0)\nelse:\n print(B)']
['Wrong Answer', 'Accepted']
['s292009177', 's830102587']
[2940.0, 2940.0]
[17.0, 17.0]
[82, 136]
p03632
u778204640
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nprint(max(max(b, d) - min(a, c), 0))', 'a, b, c, d = map(int, input().split())\nprint(max(min(b, d) - max(a, c), 0))']
['Wrong Answer', 'Accepted']
['s343898233', 's445647733']
[2940.0, 2940.0]
[17.0, 17.0]
[75, 75]
p03632
u778700306
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['\na,b,c,d = map(float, input().split())\n\na,b = max(a,c), min(b,d)\n\na = max(0.0, b-a)\n\nprint(a)\n', '\na,b,c,d = map(int, input().split())\n\na,b = max(a,c), min(b,d)\n\na = max(0, b-a)\n\nprint(a)\n']
['Wrong Answer', 'Accepted']
['s701953511', 's761114302']
[2940.0, 2940.0]
[17.0, 17.0]
[94, 90]
p03632
u781091740
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split());print(max(0,min(c,d)-max(a,b))', 'a,b,c,d=map(int,input().split());print(max(0,min(c,d)-max(a,b)))', 'a,b,c,d=map(int,input().split());print(max(0,min(b,d)-max(a,c)))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s281844971', 's629364556', 's806280661']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[63, 64, 64]
p03632
u785578220
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int, input().split())\nif a > c:\n a,b,c,d = c,d,a,b\nif b < c:print(0)\nelif b => c and b < d:print(b-c)\nelse : print(d-c)', 'a,b,c,d = map(int, input().split())\nif a > c:\n a,b,c,d = c,d,a,b\nif b < c:print(0)\nelif b => c and b < d:print(b-c)\nelse : print(d-c)', 'a,b,c,d = map(int, input().split())\nif a > c:\n a,b,c,d = c,d,a,b\nprint(a,b,c,d)\nif b < c:print(0)\nelif b > c and b < d:print(b-c)\nelse : print(d-c)', 'a,b,c,d = map(int, input().split())\nif a > c:\n a,b,c,d=c,d,a,b\nif b < c:print(0)\nelif b >= c and b < d:print(b-c)\nelse : print(d-c)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s262783487', 's865338407', 's926774455', 's278879500']
[2940.0, 2940.0, 3060.0, 3060.0]
[18.0, 18.0, 17.0, 18.0]
[136, 136, 150, 134]
p03632
u796424048
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = list(map(int,input().split()))\n\n\nif A < C:\n a = C\nelse:\n a = A\n\nif B < D:\n b = B\nelse:\n b = D\n \nif B =< C or D =< A:\n res = 0\nelse:\n res = (b-a)\n \nprint(res)\n\n', 'A,B,C,D = (map(int,input().split()))\n \nif B<C or A<D:\n res = 0\nelse:\n res = min(B,D) - max(A,C)\nprint(res)', 'A,B,C,D = (map(int,input.split()))\n\nif B<C:\n res = 0\nelse:\n res = min(B,D) - max(A<C)\nprint(res)', 'A,B,C,D = (map(int,input().split()))\n \n\nres = min(B,D) - max(A,C)\nif res <0:\n\tprint(0)\nelse:\n\tprint(res)']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s235161231', 's528074386', 's724624398', 's785357137']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[177, 112, 102, 104]
p03632
u796877631
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a = list(input().split())\n\nif max(a[0],a[2]) < min(a[1],a[3]):\n print(int(min(a[1],a[3])-int(max(a[0],a[2])))\n \n \n \nelse if max(a[0],a[2]) >= min(a[1],a[3]):\n print(0) \n', 'a = list(input().split())\nif a[0] >= a[3] or a[2] >= a[1]:\n print(0)\n\nelif a[0] <= a[2] < a[3] <= a[1]:\n print(int(a[3])-int(a[2]))\nelif a[0] <= a[2] <= a[1] <= a[3]:\n print(int(a[1])-int(a[2]))\nelif a[2] <= a[0] < a[1] <= a[3]:\n print(int(a[1])-int(a[0]))\nelif a[2] <= a[0] <= a[3] <= a[1]:\n print(int(a[3])-int(a[0]))', 'a = list(input().split())\n\nb = int(a[0])\nc = int(a[1])\nd = int(a[2])\ne = int(a[3])\n\nif max(b,d) < min(c,e):\n print(min(c,e)-max(b,d)) \n\nelif max(b,d)>=min(c,e):\n print(0)\n ']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s479263915', 's676999913', 's559008540']
[2940.0, 3064.0, 3060.0]
[17.0, 17.0, 17.0]
[220, 334, 197]
p03632
u802963389
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['ABCD = list(map(int,input().split()))\nif ABCD[1]<=ABCD[]2 or ABCD[3]<=ABCD[0]:\n print(0)\nelse:\n ABCD.sort()\n print(ABCD[2]- ABCD[1])', 'ABCD = list(map(int,input().split()))\nif ABCD[1]<=ABCD[2] or ABCD[3]<=ABCD[0]:\n print(0)\nelse:\n ABCD.sort()\n print(ABCD[2]- ABCD[1])\n']
['Runtime Error', 'Accepted']
['s850388054', 's779990464']
[2940.0, 2940.0]
[17.0, 17.0]
[135, 136]
p03632
u806403461
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\n\nprint(max(min(b, d) - max(a, c)), 0)\n', 'a, b, c, d = map(int, input().split())\n\nprint(max(min(b, d) - max(a, c), 0))\n']
['Runtime Error', 'Accepted']
['s806396854', 's527280653']
[2940.0, 2940.0]
[17.0, 17.0]
[77, 77]
p03632
u810066979
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['import sys\na,b,c,d=map(int,input().split())\nif c>=b :\n\tprint(c-b)\nelse :\n\tprint("0")', 'import sys\na,b,c,d=map(int,input().split())\n\nif a >= d or c >= b:\n\tprint (0)\nelse:\n\tprint (min(b,d)-max(a,c))']
['Wrong Answer', 'Accepted']
['s207874293', 's469710167']
[2940.0, 3060.0]
[17.0, 17.0]
[84, 109]
p03632
u813174766
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nprint(max(0,min(b,d)-max(a,c))', 'a,b,c,d=map(int,input().split())\nprint(max(0,min(b,d)-max(a,c)))']
['Runtime Error', 'Accepted']
['s309710687', 's502157312']
[2940.0, 2940.0]
[17.0, 17.0]
[63, 64]
p03632
u813450984
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['s = input().split()\nA = int(s[0])\nB = int(s[1])\nC = int(s[2])\nD = int(s[3])\n\na_c = max(A, C)\nb_d = min(B, D)\n\nif a_c - b_d:\n print(a_c - b_d)\nelse:\n print("0")', 's = map(int, input().split())\n\nA, B, C, D = [for i in s]\n\nif D <= A or C >= B:\n print("0")\nelif C <= A and D >= B:\n print(B - A)\nelif C >= A and D >= B:\n print(B - C)\nelif D <= B and C <= A:\n print(D - A)', 's = input().split()\nA = int(s[0])\nB = int(s[1])\nC = int(s[2])\nD = int(s[3])\n \na_c = max(A, C)\nb_d = min(B, D)\n \nif b_d - a_c > 0:\n print(b_d - a_c)\nelse:\n print("0")']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s477819704', 's727576707', 's505285938']
[3060.0, 2940.0, 3064.0]
[17.0, 17.0, 20.0]
[161, 208, 167]
p03632
u825528847
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nprint(len(set(range(A, B+1)) & set(range(A, B+1))))\n', 'A, B, C, D = map(int, input().split())\nprint(len(set(range(A, B+1)) & set(range(C, D+1))))\n', 'A, B, C, D = map(int, input().split())\nres = list(set(range(A, B+1)) & set(range(C, D+1)))\ntry:\n print(res[-1] - res[0])\nexcept:\n print(0)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s164787230', 's802770803', 's528585358']
[3060.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0]
[91, 91, 145]
p03632
u825842302
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int, input())\nif b < c or d < a:\n ans = 0\nelse:\n ans = min(abs(c-b), abs(d-a))\nprint(ans)\n', 'a,b,c,d = map(int, input().split())\nif b < c or d < a:\n ans = 0\nelse:\n ans = min(abs(c-b), abs(d-a), abs(b-a), abs(d-c))\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s430024537', 's031579256']
[2940.0, 2940.0]
[17.0, 17.0]
[110, 138]
p03632
u826637752
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['l = list(map(int.input().split()))\n\nl.sort()\n\nprint(l[2]-l[1])', 'l = list(map(int,input().split()))\n\nif l[1] < l[2]:\n print(0)\nelif l[0] > l[4]:\n print(0)\nelse:\n print(l[2]-l[1])', 'l = list(map(int,input().split()))\n\nif l[1] < l[2]:\n print(0)\nelif l[0] > l[4]:\n print(0)\nelse:\n l.sort()\n print(l[2]-l[1])', 'l = list(map(int,input().split()))\n\nif l[1] < l[2]:\n print(0)\nelif l[0] > l[3]:\n print(0)\nelse:\n l.sort()\n print(l[2]-l[1])']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s078334253', 's411062956', 's837846913', 's623162362']
[9012.0, 9136.0, 9072.0, 9124.0]
[24.0, 27.0, 23.0, 29.0]
[62, 122, 135, 135]
p03632
u830588156
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int,input().split())\ncount = 0\nfor i in range(101):\n\tif (A<=i<=B and C<=i<=D):\n\t\tcount += 1\nprint(count)', 'A,B,C,D = map(int,input().split())\ncount = 0\nfor i in range(101):\n\tif (A<=i<=B and C<=i<=D and A!=D and B!=C):\n\t\tcount += 1\nif (count>0):\n\tcount -= 1\nprint(int(count))']
['Wrong Answer', 'Accepted']
['s377132842', 's808927667']
[2940.0, 2940.0]
[17.0, 18.0]
[118, 167]
p03632
u835575472
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nprint(min(c, d) - max(a, b))', 'a, b, c, d = map(int, input().split())\nif a >= d or c >= b:\n print(0)\nelse:\n print(min(b, d) - max(a, c))\n']
['Wrong Answer', 'Accepted']
['s326498942', 's374014532']
[9088.0, 9088.0]
[30.0, 33.0]
[67, 108]
p03632
u845442154
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int, (input().split))\nif a < c and b < d:\n print(b-c)\nelif c < a and b < d:\n print(b-a)\nelif a < c and d < b:\n print(d-c)\nelif c < a and d < b:\n print(d-a)\nelse:\n print(0)', 'a,b,c,d = map(int, input().split)\nif a < c and b < d:\n print(b-c)\nelif c < a and b < d:\n print(b-a)\nelif a < c and d < b:\n print(d-c)\nelif c < a and d < b:\n print(d-a)\nelse:\n print(0)', 'a,b,c,d = map(int, (input().split()))\n\n\nif a <= c and b <= d and c <= b:\n print(b-c)\nelif c <= a and b <= d:\n print(b-a)\nelif a <= c and d <= b:\n print(d-c)\nelif c <= a and d <= b and a <= d:\n print(d-a)\nelse:\n print(0)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s016708640', 's369880803', 's121008330']
[3060.0, 3060.0, 3064.0]
[17.0, 17.0, 17.0]
[200, 198, 234]
p03632
u852517668
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input())\ns = max(A, C)\ne = min(B, D)\nspan = max(0, e - s)\nprint(span)', 'A, B, C, D = map(int, input().split())\ns = max(A, C)\ne = min(B, D)\nspan = max(0, e - s)\nprint(span)']
['Runtime Error', 'Accepted']
['s902683828', 's984896729']
[2940.0, 2940.0]
[17.0, 17.0]
[91, 99]
p03632
u852790844
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nans = max(0, min(b, d)) - max(a, c))\nprint(ans)', 'a, b, c, d = map(int, input().split())\nans = max(0, min(b, d) - max(a, c))\nprint(ans)']
['Runtime Error', 'Accepted']
['s822770121', 's874558367']
[2940.0, 2940.0]
[17.0, 18.0]
[86, 85]
p03632
u854992222
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nif min(b, d) - max(a, c) < 0:\n print(0)\nelse:\n min(b, d) - max(a, c)', 'a, b, c, d = map(int, input().split())\nif min(b, d) - max(a, c) < 0:\n print(0)\nelse:\n print(min(b, d) - max(a, c))']
['Wrong Answer', 'Accepted']
['s574539876', 's169902134']
[2940.0, 2940.0]
[17.0, 17.0]
[113, 120]
p03632
u859897687
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nprint(max(0,max(a,c)-min(b,d)))', 'a,b,c,d=map(int,input().split())\nprint(max(0,min(b,d)-max(a,c)))']
['Wrong Answer', 'Accepted']
['s980656465', 's294951386']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 64]
p03632
u863370423
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int(),input().split())\nprint(max(0,min(a,c)-max(b,d))', 'a,b,c,d=map(int,input().split())\nprint(max(0,min(b,d)-max(a,c)))']
['Runtime Error', 'Accepted']
['s257524254', 's671539660']
[2940.0, 3060.0]
[17.0, 17.0]
[65, 64]
p03632
u868040597
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['# coding: utf-8\n\na, b, c, d = map(int, input().split())\n\nif c <= b:\n\tif c <= d:\n\t print(b - c)\n\t else:\n\t \tprint(d - c)\nelse:\n\tprint(0)\n', '# coding: utf-8\n\na, b, c, d = map(int, input().split())\n\nalice_time = range(a, b+1)\nbob_time = range(c, d+1)\npushed_time = set(alice_time) & set(bob_time)\n\nprint(alice_time)\nprint(bob_time)\n\nif not pushed_time:\n\tprint (pushed_time[0] - pushed_time[-1])', '# coding: utf-8\n\na, b, c, d = map(int, input().split())\nalice_time = [x for x in range(a, b+1)]\nbob_time = [x for x in range(c, d+1)]\npushed_time = set(alice_time) & set(bob_time)\n\nif len(pushed_time) == 0:\n print(0)\nelse:\n print(pushed_time - 1)', '# coding: utf-8\n\na, b, c, d = map(int, input().split())\nalice_time = [x for x in range(a, b+1)]\nbob_time = [x for x in range(c, d+1)]\npushed_time = set(alice_time) & set(bob_time)\n\nif len(pushed_time) == 0:\n\tprint(0)\nelse:\n\tprint(pushed_time - 1)', '# coding: utf-8\n\na, b, c, d = map(int, input().split())\n\nalice_time = range(a, b+1)\nbob_time = range(c, d+1)\npushed_time = set(alice_time) & set(bob_time)\n\nprint(alice_time)\nprint(bob_time)\n\nif not pushed_time:\n print (pushed_time[0] - pushed_time[-1])', '# coding: utf-8\n\na, b, c, d = map(int, input().split())\nalice_time = [x for x in range(a, b+1)]\nbob_time = [x for x in range(c, d+1)]\npushed_time = set(alice_time) & set(bob_time)\n\nif len(pushed_time) == 0:\n print(0)\nelse:\n print(len(pushed_time) - 1)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s080968708', 's118079466', 's130108901', 's459771131', 's913471815', 's170501077']
[2940.0, 3060.0, 3060.0, 3060.0, 3188.0, 3060.0]
[17.0, 17.0, 17.0, 17.0, 20.0, 17.0]
[136, 252, 248, 246, 253, 253]
p03632
u880466014
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\na_b = [i for i in range(a, b+1)]\nc_d = [i for i in range(c, d+1)]\ncounter = 0\n\nfor i in range(len(a_b)):\n for j in range(len(c_d)):\n if a_b[i] == c_d[j]:\n counter += 1\n\nprint(counter)', 'a, b, c, d = map(int, input().split())\na_b = [i for i in range(a, b+1)]\nc_d = [i for i in range(c, d+1)]\ncounter = -1\nflg = "False"\n\nfor i in range(len(a_b)):\n for j in range(len(c_d)):\n if a_b[i] == c_d[j]:\n counter += 1\n flg = "True"\n\nif flg == "True":\n print(counter)\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s585510393', 's659825247']
[3064.0, 3064.0]
[19.0, 19.0]
[231, 302]
p03632
u880911340
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['if b<=c:\n print(0)\nelif d<=a:\n print(0)\nelif c>=a and d<=b:\n print(d-c)\nelif c>=a and c<=b and d>=b:\n print(b-c)\nelif a>=c and a<=d and d<=b:\n print(d-a)\nelif a>=c and b<=d:\n print(b-a)\nelse:\n print(err)', 'a,b,c,d=map(int,input().split())\n\nif min(b,d)-max(a,c)>=0:\n print(min(b,d)-max(a,c))\nelse:\n print(0)\n']
['Runtime Error', 'Accepted']
['s502808541', 's185071050']
[3060.0, 2940.0]
[17.0, 17.0]
[224, 107]
p03632
u887207211
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int,input().split())\nx = max(A, B)\ny = min(C, D)\nif(y-x > 0):\n print(y - x)\nelse:\n print(0)\n', 'a, b, c, d = map(int,input().split())\nans = 0\nif(min(b, d)-max(a, c) > 0):\n ans = min(b, d)-max(a, c)\nprint(ans)']
['Wrong Answer', 'Accepted']
['s368924080', 's166316568']
[2940.0, 2940.0]
[18.0, 18.0]
[111, 113]
p03632
u905582793
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nprint(max(min(c,d)-max(a,b),0))', 'a,b,c,d=map(int,input().split())\nprint(max(min(b,d)-max(a,c),0))']
['Wrong Answer', 'Accepted']
['s741457316', 's986764534']
[2940.0, 2940.0]
[17.0, 18.0]
[64, 64]
p03632
u912179452
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b , c ,d = map(int, input().split())\n\n\nif b < c:\n print("0")\n exit()\n\nif c<b and b<d:\n print((d-c)-(d-b))\nelif a<c adn d<b:\n print(d-c)\nelse:\n print("0")\n\n', 'a, b , c ,d = map(int, input().split())\n\n\n\nif b<c:\n print("0")\nelif a<c and (c<b and b<d):\n print(b-c)\nelif (a<c and a<d) and (c<b and d<b):\n print(d-c)\nelif (c<a and a<d) and (c<b and b<d):\n print(b-a)\nelif (c<a and a<d) and (c<b and d<b):\n print(d-a)\nelif d<a:\n print("0")\n\nprint("0")\n\n', '\nif b <= c:\n print("0")\nelif c <= a:\n print("0")\n\n\n\nif a<c and (c<b and b<d):\n print(b-c)\nelif (a<c and a<d) and (c<b and d<b):\n print(d-c)\nelif (c<a and a<d) and (c<b and b<d):\n print(b-a)\nelif (c<a and a<d) and (c<b and d<b):\n print(d-a)\nelse:\n print("0")\n', 'a, b , c ,d = map(int, input().split())\n\n\n\nmi = min(b,d )\nma = max(a,c)\n\nprint(max(0,mi - ma))']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s635212914', 's757256458', 's803617670', 's345503006']
[2940.0, 3064.0, 3060.0, 2940.0]
[17.0, 18.0, 17.0, 17.0]
[173, 306, 279, 94]
p03632
u912862653
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nif max(B, D)-min(A, C)>0:\n\tprint(max(B, D)-min(A, C))\nelse:\n\tprint(0)', 'A, B, C, D = map(int, input().split())\nif min(B, D)-max(A, C)>0:\n\tprint(min(B, D)-max(A, C))\nelse:\n\tprint(0)']
['Wrong Answer', 'Accepted']
['s157833439', 's576077265']
[2940.0, 2940.0]
[17.0, 17.0]
[108, 108]
p03632
u917558625
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D=map(int,input().split())\np=min(C,D)-max(A,B)\nif p<=0:\n print(0)\nelse:\n print(p)', 'A,B,C,D=map(int,input().split())\np=min(B,D)-max(A,C)\nif p<=0:\n print(0)\nelse:\n print(p)']
['Wrong Answer', 'Accepted']
['s637639113', 's452334308']
[9172.0, 9160.0]
[26.0, 29.0]
[89, 89]
p03632
u919633157
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d=map(int,input().split())\nprint(max(a,c)-min(b,d) if min(b,d)<max(a,c) else 0)', 'a,b,c,d=map(int,input().split())\nprint(min(b,d)-max(a,c) if min(b,d)<max(a,c) else 0)', 'a,b,c,d=map(int,input().split())\nprint(max(0,min(b,d)-max(a,c)))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s765069553', 's921104981', 's862174694']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[85, 85, 64]
p03632
u924182136
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int,input().split())\nans = 0\n\n# if B >= C:\n# if D >= A:\n# if A <= C:\n# ans = B-C\n# if A > C:\n# ans = B-A\n \n\n# elif B >= D:\n# if D >= A:\n# if A <= C :\n# ans = D-C\n# if A > C:\n# ans = D-A\n\n\nif A < C:\n if B > C:\n ans = max(A,C)-min(B,D)\n\n \n\n\nprint(ans)', 'A,B,C,D = map(int,input().split())\nans = 0\n\n# if B >= C:\n# if D >= A:\n# if A <= C:\n# ans = B-C\n# if A > C:\n# ans = B-A\n \n\n# elif B >= D:\n# if D >= A:\n# if A <= C :\n# ans = D-C\n# if A > C:\n# ans = D-A\n\n\nif min(B,D)>=max(A,C):\n ans = min(B,D)-max(A,C)\n\n \n\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s457255383', 's620493352']
[2940.0, 2940.0]
[18.0, 17.0]
[439, 432]
p03632
u928784113
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['# -*- coding: utf-8 -*-\nA,B,C,D = map(int,input().split())\nL = [A:B]\nM = [C:D]\nprint(L&M)', 'A,B,C,D = map(int,input().split())\n\nsup = max(D,B)\ninf = min(A,C)\n\nif B-A + D-C <= sup - inf:\n print(0)\nelse:\n print(B-A+D-C - (sup - inf))']
['Runtime Error', 'Accepted']
['s727705071', 's179114119']
[2940.0, 3060.0]
[18.0, 17.0]
[89, 145]
p03632
u931938233
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["A,B,C,D = map(int,input().split(' '))\nif B < C:\n print(0)\nelse:\n print(min(B-A,min(D-C,C-B)))", "A,B,C,D = map(int,input().split(' '))\nprint(max(0,min(B,D)-max(A,C)))"]
['Wrong Answer', 'Accepted']
['s501990513', 's625243675']
[9160.0, 8968.0]
[31.0, 27.0]
[95, 69]
p03632
u933214067
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['from statistics import mean, median,variance,stdev\nimport numpy as np\nimport sys\nimport math\nimport fractions\nimport itertools\n\ndef j(q):\n if q==1: print("Yes")\n else:print("No")\n exit(0)\n\n\ndef ct(x,y):\n if (x>y):print("")\n elif (x<y): print("")\n else: print("")\n\ndef ip():\n return int(input())\n\ndef swap(s,pos):\n s[pos]-=1\n s[pos+1]+=1\n print(s)\n if pos == n-2: return s\n if s[pos+2] == 0: swap(s,pos+1)\n return s\n\npl = \'abcdefghijklmnopqrstuvwxyz\'\n\n\n\n\na,b,c,d= (int(i) for i in input().split()) \n\n\n\n\n\n\n\n\ne = set([i for i in range(a,b+1)])\nf = set([i for i in range(c,d+1)])\nprint(len(e & f))', 'from statistics import mean, median,variance,stdev\nimport numpy as np\nimport sys\nimport math\nimport fractions\nimport itertools\n\ndef j(q):\n if q==1: print("Yes")\n else:print("No")\n exit(0)\n\n\ndef ct(x,y):\n if (x>y):print("")\n elif (x<y): print("")\n else: print("")\n\ndef ip():\n return int(input())\n\ndef swap(s,pos):\n s[pos]-=1\n s[pos+1]+=1\n print(s)\n if pos == n-2: return s\n if s[pos+2] == 0: swap(s,pos+1)\n return s\n\npl = \'abcdefghijklmnopqrstuvwxyz\'\n\n\n\n\na,b,c,d= (int(i) for i in input().split()) \n\n\n\n\n\n\n\n\ne = set([i for i in range(a,b)])\nf = set([i for i in range(c,d)])\nprint(len(e & f))']
['Wrong Answer', 'Accepted']
['s074298471', 's791990627']
[22300.0, 14408.0]
[314.0, 182.0]
[1293, 1289]
p03632
u934529721
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['S = list(map(int,input().split()))\n \nif S[0] =< S[1] =< S[2] =< S[3]:\n print (0)\n \nelif S[0] =< S[2] =< S[3] =< S[1]:\n print(S[3]-S[2])\n \nelif S[0] =< S[2] =< S[1] =< S[3]:\n print(S[1] - S[2])\n \nelif S[2] =< S[0] =< S[3] =< S[1]:\n print(S[3] - S[0])\n \nelif S[2] =< S[3] =< S[0] =< S[1]:\n print(0)', 'A,B,C,D=map(int,input().split())\n \nif B<=C or D<=A:\n print(0)\nelif A<=C and B<=D:\n print(B-C)\nelif C<=A and D<=B:\n print(D-A)\nelif A<=C and D<=B:\n print(D-C)\nelif C<=A and B<=D:\n print(B-A)\n']
['Runtime Error', 'Accepted']
['s743578757', 's859966273']
[2940.0, 2940.0]
[17.0, 27.0]
[320, 205]
p03632
u934788990
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\n\nif max(b,d) > min(b,d):\n print(0)\nelse:\n print(min(b,d)-max(a,c))', 'a,b,c,d = map(int,input().split())\n\nprint(max(0,min(b,d)-max(a,c)))']
['Wrong Answer', 'Accepted']
['s184238656', 's756677923']
[2940.0, 2940.0]
[17.0, 17.0]
[107, 67]
p03632
u934868410
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int,input().split())\nmax(0, min(b,d) - max(a,c))', 'a,b,c,d = map(int,input().split())\nprint(max(0, min(b,d) - max(a,c)))']
['Wrong Answer', 'Accepted']
['s471327594', 's730378196']
[2940.0, 2940.0]
[17.0, 17.0]
[62, 69]
p03632
u937164028
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
["if __name == '__main__':\n A, B, C, D = map(int, input().split())\n\n if B =< C or D =< A:\n print(0)\n else:\n if A < C:\n print(B-C)\n else:\n print(D - A)", "if __name__ == '__main__':\n A, B, C, D = map(int, input().split())\n\n if B <= C or D <= A:\n print(0)\n else:\n if A < C:\n print(B-C)\n elif A > C\n print(D - A)\n else:\n if B < D:\n print(B-A)\n else:\n print(D-A)", "if __name__ == '__main__':\n A, B, C, D = map(int, input().split())\n\n if B <= C or D <= A:\n print(0)\n else:\n if A < C:\n if B < D:\n print(B-C)\n else:\n print(D-C)\n elif A > C:\n if B < D:\n print(B-A)\n else:\n print(D-A)\n else:\n if B < D:\n print(B-A)\n else:\n print(D-A)"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s187520170', 's901989061', 's813705253']
[3060.0, 2940.0, 3064.0]
[18.0, 18.0, 17.0]
[200, 315, 456]
p03632
u939790872
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int, input().split())\nif b <= c or d <= a:\n print(0)\nelif c <= a and b <= d:\n print(b-a)\nelif a <= c and d <= b:\n print(d-c)\nelif a <= d:\n print(c-b)\nelse:\n print(d-a)', 'a, b, c, d = map(int, input().split())\nif min(b, d) < max(a, c):\n print(0)\nelse:\n print(min(b, d)-max(a, c))']
['Wrong Answer', 'Accepted']
['s521200345', 's695145102']
[9172.0, 9008.0]
[24.0, 26.0]
[199, 114]
p03632
u941884460
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['# coding: utf-8\nline = input().rstrip().split()\n\nA = int(line[0])\nB = int(line[1])\nC = int(line[2])\nD = int(line[3])\n\nif A <= C:\n if B<= C:\n print(0)\n else:\n if B<= D:\n print(C-B)\n else:\n print(D-C)\nelse:\n if A <= D:\n print(D-A)\n else:\n print(0)', '# coding: utf-8\nline = input().rstrip().split()\n\nA = int(line[0])\nB = int(line[1])\nC = int(line[2])\nD = int(line[3])\n\nif A <= C:\n if B<= C:\n print(0)\n else:\n if B<= D:\n print(B-C)\n else:\n print(D-C)\nelse:\n if A <= D:\n if B <= D:\n print(B-A)\n else:\n print(D-A)\n else:\n print(0)']
['Wrong Answer', 'Accepted']
['s589933675', 's473747173']
[3060.0, 3060.0]
[17.0, 18.0]
[314, 374]
p03632
u957872856
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b, c, d = map(int,input().split())\ne = list(range(a,b+1))\nd = list(range(c,d+1))\nprint(e)\nl = []\nfor i in e:\n if i in d:\n l.append(i)\nif l == []:\n print(0)\nelse:\n print(len(l)-1)', 'a, b, c, d = map(int,input().split())\ne = list(range(a,b+1))\nd = list(range(c,d+1))\n#print(e)\nl = []\nfor i in e:\n if i in d:\n l.append(i)\nif l == []:\n print(0)\nelse:\n print(len(l)-1)']
['Wrong Answer', 'Accepted']
['s076070566', 's111000293']
[3064.0, 3060.0]
[17.0, 17.0]
[187, 188]
p03632
u962356464
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a, b , c, d = map(int, input().split())\nif b <= c or d>=a:\n print(0)\nelif b > c and b <= d:\n print(d-c)\nelif b > c:\n print(b-c)\n\n \n', 'a, b , c, d = map(int, input().split())\nif b<=c or d <= a :\n print(0)\nelif c<=b:\n if c <= a and b<=d:\n print(b-a)\n elif a<= c and b<=d:\n print(b-c)\n elif a<=c and d<=b:\n print(d-c)\n elif c<=a and d<=b:\n print(d-a)']
['Wrong Answer', 'Accepted']
['s046818646', 's572043687']
[2940.0, 3060.0]
[17.0, 17.0]
[143, 256]
p03632
u967822229
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\n\nif A<C:\n A=C\nif D<B:\n B=D\n\nprint(A-B)', 'A, B, C, D = map(int, input().split())\n\nif A<C:\n A=C\nif D<B\n B=D\n\nprint(A-B)', 'A, B, C, D = map(int, input().split())\n\nans=0\n\nif A<C:\n A=C\nif D<B:\n B=D\n\nif B<C or D<A:\n ans=0\nelse:\n ans=A-B\n\nprint(ans)', 'A, B, C, D = map(int, input().split())\n\nans=0\n\nif A<C:\n A=C\nif D<B:\n B=D\n\nif B<C:\n ans=0\nelse:\n ans=A-B\n\nprint(ans)', 'A, B, C, D = map(int, input().split())\n\nans=0\n\nif A<C:\n A=C\nif D<B:\n B=D\n\nif B<C or D<A:\n ans=0\nelse:\n ans=abs(A-B)\n\nprint(ans)']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s070731370', 's108848495', 's262256005', 's387651084', 's659071301']
[2940.0, 2940.0, 3060.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0, 18.0, 17.0]
[83, 82, 134, 127, 139]
p03632
u970809473
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['a,b,c,d = map(int, input().split())\nprint(max(0, min(b,d) - min(a,c)))', 'a,b,c,d = map(int, input().split())\nprint(max(0, min(b,d) - max(a,c)))\n']
['Wrong Answer', 'Accepted']
['s102000061', 's535625023']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 71]
p03632
u982762220
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A, B, C, D = map(int, input().split())\nmax(0, min(B, D) - max(A, C))', 'A, B, C, D = map(int, input().split())\nprint(max(0, min(B, D) - max(A, C)))']
['Wrong Answer', 'Accepted']
['s280812412', 's149740163']
[2940.0, 2940.0]
[17.0, 17.0]
[68, 75]
p03632
u984276646
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D=map(int,input().split())\nprint(max(0,max(A,C)-min(B,D)))', 'A,B,C,D=map(int,input().split())\nprint(max(0,min(B,D)-max(A,C)))']
['Wrong Answer', 'Accepted']
['s985994103', 's728537644']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 64]
p03632
u987164499
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['from sys import stdin\nfrom itertools import groupby\n\na,b,c,d = [int(x) for x in stdin.readline().rstrip().split()]\n\nif b < c or d < a:\n print(0)\nelif b >= c and d <= b:\n print(d-c)\nelif a >= c and b <= d:\n print(b-a)\nelif a >= c:\n print(d-a)\nelif c < a:\n print(b-c)', 'from sys import stdin\nfrom itertools import groupby\n\na,b,c,d = [int(x) for x in stdin.readline().rstrip().split()]\n\nif b < c or d < a:\n print(0)\nelif b >= d and c >= a:\n print(d-c)\nelif a >= c and b <= d:\n print(b-a)\nelif a >= c:\n print(d-a)\nelif c > a:\n print(b-c)']
['Wrong Answer', 'Accepted']
['s809982656', 's092912846']
[3060.0, 3060.0]
[18.0, 17.0]
[280, 280]
p03632
u993435350
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int,input().split())\n \ninter1 = [i for i in range(A,B + 1)]\ninter2 = [i for i in range(C,D + 1)]\n \ninter3 = []\n \nfor i in range(0,max(B,D)):\n if i in inter1 and i in inter2:\n inter3.append(i)\n \nif len(inter3) > 1:\n print(max(inter3) - min(inter3))\nelif len(inter3) == 1:\n print(1)\nelse:print(0)\n \nprint(inter3)', 'A,B,C,D = map(int,input().split())\n\ninter1 = {i for i in range(A,B + 1)}\ninter2 = {i for i in range(C,D + 1)}\n\nprint(len(inter1 or inter2) - 1)', 'A,B,C,D = map(int,input().split())\n \nalice = [i for i in range(A,B + 1)]\nbob = [i for i in range(C,D + 1)]\n \ncommon = [i for i in bob if i in alice]\n\nif len(common) == 0:\n print(0)\nelse:\n print(len(common)-1)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s503021135', 's829839695', 's628455054']
[3064.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0]
[334, 143, 210]
p03632
u993461026
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['A,B,C,D = map(int, input().rstrip().split())\nprint(max([A,C]) - min([B, D]) if max([A,C]) - min([B, D]) > 0 else 0)', 'A,B,C,D = map(int, input().rstrip().split())\nprint(max([A,B]) - min([C,D])', 'A,B,C,D = map(int, input().rstrip().split())\nprint(min([B, D]) - max([A,C]) if min([B, D]) - max([A,C]) > 0 else 0)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s042842508', 's711625221', 's334406004']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[115, 74, 115]
p03632
u994988729
2,000
262,144
Alice and Bob are controlling a robot. They each have one switch that controls the robot. Alice started holding down her button A second after the start-up of the robot, and released her button B second after the start-up. Bob started holding down his button C second after the start-up, and released his button D second after the start-up. For how many seconds both Alice and Bob were holding down their buttons?
['n=[0]*101\na,b,c,d=map(int,input().split())\nn[a]+=1\nn[b+1]-=1\nn[c]+=1\nn[d+1]-=1\nfor i in range(100):\n n[i+1]+=n[i]\nans=0\nfor i in n:\n if i==2:\n ans+=1\nprint(ans)\n\n \n', 'n=[0]*101\na,b,c,d=map(int,input().split())\nn[a]+=1\nn[b]-=1\nn[c]+=1\nn[d]-=1\nfor i in range(100):\n n[i+1]+=n[i]\nans=0\nfor i in n:\n if i==2:\n ans+=1\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s638442363', 's548874707']
[3060.0, 3060.0]
[17.0, 17.0]
[170, 162]
p03633
u010110540
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['5\n2\n5\n10\n1000000000000000000\n1000000000000000000', 'N = int(input())\nT = [int(input()) for _ in range(N)]\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\ndef lcm(a, b):\n return a * b // gcd(a, b)\n\nl = 1\n\nfor i in T:\n l = lcm(l, i)\n\nprint(l)']
['Wrong Answer', 'Accepted']
['s612639117', 's925664731']
[2940.0, 3188.0]
[16.0, 18.0]
[48, 213]
p03633
u013408661
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['import sys\nsys.setrecursionlimit(10**18)\nn=int(input())\nt=[int(i) for i in sys.stdin]\ndef gcd(x,y):\n if y==0:\n return x\n return gcd(y,x%y)\nx=t[0]\nfor i in range(1,n):\n y=x*t[i]//gcd(x,t[i])\n x=y\nprint(y)', 'import sys\nsys.setrecursionlimit(10**8)\nn=int(input())\nt=[int(i) for i in sys.stdin]\nif n==1:\n print(t[0])\n exit()\ndef gcd(x,y):\n if y==0:\n return x\n return gcd(y,x%y)\nx=t[0]\nfor i in range(1,n):\n y=x*t[i]//gcd(x,t[i])\n x=y\nprint(y)']
['Runtime Error', 'Accepted']
['s835873119', 's595012086']
[3060.0, 3060.0]
[17.0, 17.0]
[210, 241]
p03633
u021548497
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['def gcd(p, q):\n if p < q:\n p, q = q, p\n while q > 0:\n p, q = q, p%q\n return p\n\nn = int(input())\nans = 1\nfor i in range(n):\n t = int(input())\n ans = a*t//gcd(a, t)\nprint(ans)', 'from fractions import gcd\nn = int(input())\nans = 1\nfor i in range(n):\n t = int(input())\n ans = a*t//gcd(a, t)\nprint(ans)', 'def gcd(p, q):\n if p < q:\n p, q = q, p\n while q > 0:\n p, q = q, p%q\n return p\n\nn = int(input())\nans = 1\nfor i in range(n):\n t = int(input())\n ans = ans*t//gcd(ans, t)\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s622339416', 's951123684', 's960362441']
[3060.0, 5048.0, 3060.0]
[17.0, 36.0, 17.0]
[198, 122, 202]
p03633
u041075929
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['// Created by sz\n#include <bits/stdc++.h>\nusing namespace std;\n\nconst int N = 1e5 + 5;\nint n;\nlong long a[N];\n\n\nlong long gcd(long long a, long long b){\n return b ? gcd(b, a % b) : a;\n}\n\n\n\nint main(){\n#ifdef LOCAL\n freopen("./input.txt", "r", stdin);\n#endif\n ios_base::sync_with_stdio(false);\n cin.tie(0);\n \n cin>>n;\n \n for (int i = 1; i <= n; i++)cin>>a[i];\n \n long long lcm = 1;\n \n for (int i = 1; i <= n; i++){\n lcm = lcm/gcd(a[i], lcm)*a[i];\n }\n cout<<lcm<<endl;\n \n \n return 0;\n}\n\n', "import sys, os\n\nf = lambda:list(map(int,input().split()))\nif 'local' in os.environ :\n sys.stdin = open('./input.txt', 'r')\n\ndef gcd(a, b):\n return gcd(b, a % b) if b else a\n\n\ndef solve():\n n = f()[0]\n a = []\n for i in range(n):\n a.append(f()[0])\n\n lcm = a[0]\n\n for i in range(1,n):\n lcm = lcm*a[i]//gcd(lcm, a[i])\n\n print(lcm)\n\n\nsolve()\n"]
['Runtime Error', 'Accepted']
['s449660070', 's973056625']
[2940.0, 3064.0]
[18.0, 18.0]
[544, 375]
p03633
u065079240
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['import fractions\nN = int(input())\nclock = [0]*N\ngcd = int(input())\nclock[0] = gcd\nans = clock[0]\nfor i in range(1, N):\n clock[i] = int(input())\n gcd = fractions.gcd(ans, clock[i])\n ans = ans*clock[i]/gcd\n\nprint(int(ans))\n', 'import fractions\n\n\ndef GCD(a, b):\n if b == 0:\n return a\n else:\n GCD(b, a % b)\n\n\nN = int(input())\nclock = [0]*N\ngcd = int(input())\nclock[0] = gcd\nans = clock[0]\nfor i in range(1, N):\n clock[i] = int(input())\n gcd = GCD(ans, clock[i])\n ans /= gcd\n ans *= clock[i]\n\nprint(int(ans))\n', 'import fractions\nN = int(input())\nclock = [0]*N\ngcd = int(input())\nclock[0] = gcd\nans = clock[0]\nfor i in range(1, N):\n clock[i] = int(input())\n gcd = fractions.gcd(ans, clock[i])\n ans /= gcd\n ans+=clock[i]\n\nprint(int(ans))\n', 'import fractions\nN = int(input())\nclock = [0]*N\ngcd = int(input())\nclock[0] = gcd\nans = clock[0]\nfor i in range(1, N):\n clock[i] = int(input())\n gcd = fractions.gcd(ans, clock[i])\n ans /= gcd\n ans*=clock[i]\n\nprint(int(ans))\n', 'import fractions\nN = int(input())\nlcd = 1\ngcd = 1\nfor i in range(N):\n inp = int(input())\n gcd = fractions.gcd(lcd, inp)\n lcd = lcd * inp / gcd\nprint(int(lcd))\n', 'import fractions\n\n\ndef GCD(a, b):\n if b == 0:\n return a\n else:\n return GCD(b, a % b)\n\n\nN = int(input())\nclock = [0] * N\nfor j in range(N):\n clock[j] = int(input())\ngcd = clock[0]\n\nans = clock[0]\nfor i in range(1, N):\n gcd = GCD(ans, clock[i])\n ans = ans//gcd\n ans = ans * clock[i]\n\nprint(int(ans))\n']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s144898688', 's597030110', 's623796113', 's794078524', 's795768214', 's266039643']
[5048.0, 5048.0, 5048.0, 5048.0, 5048.0, 5048.0]
[2104.0, 35.0, 36.0, 2104.0, 2104.0, 37.0]
[230, 311, 236, 236, 168, 330]
p03633
u067983636
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['def l(a, b):\n if a > b:\n a, b = b, a\n return l(a, b % a) if b % a else a\n\ndef g(a, b):\n return a * b // l(a, b)\n\nN = int(input())\nres = 1\nfor n in range(N):\n res = g(res, int(input())\n\nprint(res)', 'def l(a, b):\n if a > b:\n a, b = b, a\n return l(a, b % a) if b % a else a\n\ndef g(a, b):\n return a * b // l(a, b)\n\nN = int(input())\nres = 1\nfor n in range(N):\n res = g(res, int(input()))\n\nprint(res)']
['Runtime Error', 'Accepted']
['s455707139', 's910319579']
[2940.0, 3060.0]
[17.0, 19.0]
[202, 203]
p03633
u070200692
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['import math\n\nn = int(input())\na = [] \n for i in range(n):\n a.append(int(input()))\nif n == 1:\n print(a[0])\nelse:\n lcm = (a[0] * a[1]) // math.gcd(a[0], a[1])\n for i in range(2, n):\n lcm = (lcm * a[i]) // math.gcd(lcm, a[i])\n print(lcm)\n', 'import math\n\nn = int(input())\na = [] \nfor i in range(n):\n a.append(int(input()))\nif n == 1:\n print(a[0])\nelse:\n lcm = (a[0] * a[1]) // math.gcd(a[0], a[1])\n for i in range(2, n):\n lcm = (lcm * a[i]) // math.gcd(lcm, a[i])\n print(lcm)\n']
['Runtime Error', 'Accepted']
['s476359798', 's689188147']
[8976.0, 9144.0]
[28.0, 29.0]
[247, 243]
p03633
u073775598
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['#ABC070C\nimport math\nfrom functools import reduce\nN=int(input())\nT=[int(input()) for i in range(N)]\ndef lcm_base(x, y):\n interium=x/math.gcd(x, y)\n return (interium*y)\nprint(reduce(lcm_base, T))\n', '#ABC070C\nimport math\nfrom functools import reduce\n#N=int(input())\nT=[int(input()) for i in range(N)]\ndef lcm_base(x, y):\n return (x//math.gcd(x, y)*y)\nprint(reduce(lcm_base, T))\n', '#ABC070C\nimport math\nfrom functools import reduce\nN=int(input())\nT=[int(input()) for i in range(N)]\n#def lcm_base(x, y):\n# interium=x//math.gcd(x, y)\n# return (interium*y)\n#print(reduce(lcm_base, T))\nans=1\ndef grcode(x, y):\n if y==0:\n return (x)\n else:\n return grcode(y, x%y)\nfor i in range(N-1):\n T[i]=T[i]//grcode(T[i],T[i+1])\n T[i+1]=T[i]*T[i+1]\nprint(T[N-1])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s301144505', 's643672475', 's768415315']
[3572.0, 3572.0, 3688.0]
[23.0, 23.0, 23.0]
[201, 181, 394]
p03633
u077898957
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['import sys\n\nN = int(input())\nT = sorted([int(input()) for i in range(N)])[::-1]\nif len(T)==1:\n print(T[0])\n sys.exit()\ndef gcd(x,y):\n a = max(x,y)\n b = min(x,y)\n while b!=0:\n a,b = b,a%b\n return a\n\ng = T[0]\nfor i in range(N-1):\n g = gcd(g,T[i+1])\nprint((T[0]*g)//g)', 'N = int(input())\nT = [int(input()) for i in range(N)]\n\ndef gcd(x,y):\n a = max(x,y)\n b = min(x,y)\n while b!=0:\n a,b = b,a%b\n return a\n\ng = T[0]\nfor i in range(N-1):\n g = (g*T[i+1])//gcd(g,T[i+1])\nprint(g)']
['Wrong Answer', 'Accepted']
['s307829491', 's785209271']
[3064.0, 3060.0]
[18.0, 18.0]
[293, 225]
p03633
u080883543
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['n = int(input())\nt = []\nfor i in range(n):\n t.append(int(input()))\n\nt = sorted(t)[::-1]\nbiggest = t[0]\nfor i in range(biggest, 10**18+1, biggest):\n print(i)\n ok = True\n for j in t[1:]:\n if i%j != 0:\n ok = False\n break\n if ok == True:\n break\n \nprint(i)\n ', 'n = int(input())\nt = []\nfor i in range(n):\n t.append(int(input()))\n \ndef gcd(a, b):\n if b == 0:\n return a\n return gcd(b, a%b)\n\ndef lcm(a, b):\n return a*b//gcd(a, b)\n\nresult = 1\nfor i in range(n):\n result = lcm(result, t[i])\n \nprint(result)\n ']
['Wrong Answer', 'Accepted']
['s550023120', 's756138740']
[29556.0, 3060.0]
[2104.0, 18.0]
[318, 280]
p03633
u089230684
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['def gcd(a, b):\n if(a == 0):\n return b\n return gcd(b % a, a)\ndef lcm(a, b):\n return a / (gcd(a, b) * b) \nt = int(input())\nans = 1\nwhile(t != 0):\n t -= 1\n n = int(input())\n ans = lcm(ans, n)\nprint(int(ans))\n', 'def gcd(a, b):\n if(a == 0):\n return b\n return gcd(b % a, a)\ndef lcm(a, b):\n return a // gcd(a, b) * b\nt = int(input())\nans = 1\nwhile(t != 0):\n t -= 1\n n = int(input())\n ans = lcm(ans, n)\nprint(int(ans))\n']
['Wrong Answer', 'Accepted']
['s399810575', 's257971648']
[9112.0, 9080.0]
[30.0, 26.0]
[230, 228]
p03633
u091051505
2,000
262,144
We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?
['n = int(input())\na = [1]\nfor _ in range(n):\n a.append(int(input()))\nfor i in range(1, n+1):\n a[i] = lcm(a[i-1], a[i])\nprint(a[-1])', 'def gcd(a,b):\n while b:\n a, b = b, a%b\n return a\n\ndef lcm(a,b):\n return a * b // (gcd(a,b))\nn = int(input())\na = [1]\nfor _ in range(n):\n a.append(int(input()))\nfor i in range(1, n+1):\n a[i] = lcm(a[i-1], a[i])\nprint(a[-1])']
['Runtime Error', 'Accepted']
['s837300649', 's197173074']
[2940.0, 3064.0]
[17.0, 18.0]
[136, 244]