Buggy python submission (verdict: Runtime Error):
import math

x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

cd = c*d // math.gcd(c,d)
print(cd)

Fixed submission:
import fractions

x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

cd = c*d // fractions.gcd(c,d)
cd_count = (b//cd) - ((a-1)//cd)
ans = (b+1-a)-c_count-d_count+cd_count

print(ans)

Buggy python submission (verdict: Runtime Error):
import math

x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

cd = c*d // math.gcd(c,d)
cd_count = (b//cd) - ((a-1)//cd)
ans = (b+1-a)-c_count-d_count+cd_count

print(ans)


Fixed submission:
import fractions

x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

cd = c*d // fractions.gcd(c,d)
cd_count = (b//cd) - ((a-1)//cd)
ans = (b+1-a)-c_count-d_count+cd_count

print(ans)

Buggy python submission (verdict: Runtime Error):
import math

x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

cd = c*d // math.gcd(c,d)
cd_count = (b//cd) - ((a-1)//cd)

print((b+1-a)-c_count-d_count+cd_count)

Fixed submission:
import fractions

x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

cd = c*d // fractions.gcd(c,d)
cd_count = (b//cd) - ((a-1)//cd)
ans = (b+1-a)-c_count-d_count+cd_count

print(ans)

Buggy python submission (verdict: Runtime Error):
x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

import math

cd = c*d // math.gcd(c,d)
cd_count = (b//cd) - ((a-1)//cd)

print((b+1-a)-c_count-d_count+cd_count)

Fixed submission:
import fractions

x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

cd = c*d // fractions.gcd(c,d)
cd_count = (b//cd) - ((a-1)//cd)
ans = (b+1-a)-c_count-d_count+cd_count

print(ans)

Buggy python submission (verdict: Runtime Error):
x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//c)

import math

cd = c*d // math.gcd(c,d)
cd_count =  (b//cd) - ((a-1)//cd)

print((b+1-a)-c_count-d_count+cd_count)

Fixed submission:
import fractions

x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

cd = c*d // fractions.gcd(c,d)
cd_count = (b//cd) - ((a-1)//cd)
ans = (b+1-a)-c_count-d_count+cd_count

print(ans)

Buggy python submission (verdict: Runtime Error):
x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//c)

import math

cd = c*d // math.gcd(c,d)
cd_count =  (b//cd) - ((a-1)//cd)

print(cd)
print(c_count)
print(d_count)
print(cd_count)

print((b+1-a)-c_count-d_count+cd_count)

Fixed submission:
import fractions

x = input().split(" ")
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])

c_count = (b//c)-((a-1)//c)
d_count = (b//d)-((a-1)//d)

cd = c*d // fractions.gcd(c,d)
cd_count = (b//cd) - ((a-1)//cd)
ans = (b+1-a)-c_count-d_count+cd_count

print(ans)